[SOLVED] PKGBUILD batterymon-clone

I have looked at the wiki for creating pkgbuilds and I think I am in over my head.  Troubleshooting one or two minor mistakes is a little different than writing one from scratch.  Could someone help me please?
https://github.com/denilsonsa/batterymon-clone
# Maintainer: Your Name <[email protected]>
pkgname=batterymon-clone
pkgver=1.3.0
pkgrel=1
pkgdesc="a simple battery monitor tray icon using acpi"
arch=()
url=""
license=('GPL')
groups=()
depends=(python pygtk)
makedepends=()
optdepends=(notify-python)
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=($pkgname-$pkgver.tar.gz)
noextract=()
md5sums=() #generate with 'makepkg -g'
build() {
cd "$srcdir/$pkgname-$pkgver"
./configure --prefix=/usr
make
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
Thanks.
Edit to reflect completed PKGBUILD.
https://aur.archlinux.org/packages.php?ID=52974
Last edited by monstermudder78 (2011-10-06 22:12:47)

No custom kernel that I am aware of, however I believe the problem is related to the EeePC 1000HE that I am using.
Thanks for all your help.
EDIT:
So this is what I have come up with:
$ batterymon
Traceback (most recent call last):
File "/usr/bin/batterymon", line 589, in <module>
main()
File "/usr/bin/batterymon", line 578, in main
pm = PowerManager()
File "/usr/bin/batterymon", line 486, in __init__
self.adapters = AcAdapterDetector().get_all()
File "/usr/bin/batterymon", line 75, in get_all
for name in os.listdir(basepath):
OSError: [Errno 2] No such file or directory: '/proc/acpi/ac_adapter'
$ acpitool -a
AC adapter : <info not available>
$ acpi
Battery 0: Charging, 98%, charging at zero rate - will never fully charge.
Not sure if this sheds any light on what I may be able to tweak to get this to work or not?
Last edited by monstermudder78 (2011-10-06 22:11:37)

Similar Messages

  • [SOLVED] (PKGBUILD) problem with makepkg for go-openoffice

    [SOLVED]: In the PKGBUILD, there's a function before build(), named mksource() and a comment "source PKGBUILD && mksource".
    Just run it first, then copy the "/tmp/go-openoffice-source/go-openoffice-ooo320-m12.tar.xz", run "makepkg -s" as usual.
    Thanks :D
    Hi, I tried to makepkg for extra/go-openoffice (from abs) by using "makepkg -s" on my x86_64 laptop, and get the following error (before the build begin):
    ==> ERROR: go-openoffice-ooo320-m12.tar.xz was not found in the build directory and is not a URL.
    I understand that this comes from
    pkgname=go-openoffice
    _ootag=ooo320-m12 # m12 = OOo 3.2.0 RC5
    source=(${_mirror}/${_go_tree}/ooo-build-${_GOver}.tar.gz
        ArchLinux.patch
        ${pkgname}-${_ootag}.tar.xz
    But, I don't know where to find this "go-openoffice-ooo320-m12.tar.xz". Can you please help me to figure out where to find it? Thank you!
    Following is the PKGBUILD for extra/go-openoffice (from abs)
    # $Id: PKGBUILD 74152 2010-03-30 17:02:00Z andyrtr $
    # Maintainer: AndyRTR <[email protected]>
    pkgname=go-openoffice
    _GOver=3.2.0.9 # = post OOo 3.2.0 final bugfix
    pkgver=${_GOver}
    pkgrel=1
    pkgdesc="OpenOffice.org - go-oo.org enhanced version of SUN's office suite"
    arch=('i686' 'x86_64')
    _go_tree="OOO320"
    _ootag=ooo320-m12 # m12 = OOo 3.2.0 RC5
    license=('LGPL3')
    url="http://go-oo.org/"
    install=${pkgname}.install
    depends=("curl>=7.19.6" "hunspell>=1.2.8" "python>=2.6.4" 'libwpd' 'redland>=1.0.10'
    'libxaw' "neon>=0.28.6" "icu>=4.2.1" 'hsqldb-java' 'libxslt' 'libxtst' 'lpsolve'
    'beanshell' 'saxon' 'vigra' 'hyphen' 'libmspack' 'libldap' 'gtk2' 'lucene'
    'hicolor-icon-theme' 'shared-mime-info' 'desktop-file-utils') # 'libmythes' 'libgraphite'
    optdepends=('java-runtime: adds java support'
    'libcups: adds printing support'
    'gconf: adds additional gnome support'
    'nss: adds support for signed files/macros'
    'pstoedit: translates PostScript and PDF graphics into other vector formats'
    'poppler: for the pdfimport extension'
    'mesa: for the OGLTrans extension'
    'mono: allows UNO automation with Mono'
    'gstreamer0.10-base: + some gstr-plugins to support multimedia content, e.g. in impress'
    'kdelibs: for kde integration')
    makedepends=('automake' 'autoconf' 'wget' 'bison' 'findutils' 'flex' 'gawk' 'gcc-libs' 'libart-lgpl'
    'pam' 'sane' 'perl-archive-zip' 'pkgconfig' 'unzip' 'zip' "xulrunner>=1.9.2-4" 'apache-ant' 'cairo'
    'gperf' 'libcups' 'pstoedit' 'gconf' "openjdk6>=1.5.2" 'unixodbc' 'mesa>=7.5' 'poppler>=0.10.7'
    'gstreamer0.10-base>=0.10.26' 'mono>=2.6.1' 'kdelibs>=4.4.0' 'libjpeg' 'boost' 'git' 'rsync')
    backup=(usr/lib/go-openoffice/program/sofficerc)
    provides=('openoffice-base')
    conflicts=('openoffice-base')
    _mirror="http://download.go-oo.org/"
    source=(${_mirror}/${_go_tree}/ooo-build-${_GOver}.tar.gz
    ArchLinux.patch
    ${pkgname}-${_ootag}.tar.xz
    http://download.go-oo.org//DEV300/ooo-cli-prebuilt-3.2.tar.bz2
    http://cairographics.org/releases//cairo-1.4.10.tar.gz
    http://download.go-oo.org//SRC680/mdbtools-0.6pre1.tar.gz
    http://download.go-oo.org//SRC680/extras-3.tar.bz2
    http://download.go-oo.org//SRC680/biblio.tar.bz2
    http://tools.openoffice.org/unowinreg_prebuild/680//unowinreg.dll
    http://download.go-oo.org//DEV300/scsolver.2008-10-30.tar.bz2
    http://download.go-oo.org//libwpd/libwpd-0.8.14.tar.gz
    http://download.go-oo.org//SRC680/libwps-0.1.2.tar.gz
    http://download.go-oo.org//SRC680/libwpg-0.1.3.tar.gz
    http://download.go-oo.org//DEV300/ooo_oxygen_images-2009-06-17.tar.gz
    http://download.go-oo.org/src//seamonkey-1.1.14.source.tar.gz
    http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.tar.gz
    buildfix_64bit_system_libjpeg.diff
    system-redland.patch
    localize-ooo.diff)
    #options=('!distcc' '!ccache' '!makeflags')
    options=('!makeflags')
    noextract=(ooo-cli-prebuilt-3.2.tar.bz2 cairo-1.4.10.tar.gz mdbtools-0.6pre1.tar.gz extras-3.tar.bz2 biblio.tar.bz2 unowinreg.dll
    scsolver.2008-10-30.tar.bz2 libwpd-0.8.14.tar.gz libwps-0.1.2.tar.gz libwpg-0.1.3.tar.gz ooo_oxygen_images-2009-06-17.tar.gz)
    # source PKGBUILD && mksource
    mksource() {
    mkdir /tmp/$pkgname-source
    pushd /tmp/$pkgname-source
    wget ${_mirror}/${_go_tree}/ooo-build-${_GOver}.tar.gz
    tar -xvf ooo-build-${_GOver}.tar.gz
    cd ooo-build-${_GOver}
    ./configure --quiet --with-distro=ArchLinux
    ./download --all
    pushd src; tar -cvJf ../../${pkgname}-${_ootag}.tar.xz clone; popd
    popd
    build() {
    unset J2REDIR; unset J2SDKDIR; unset JAVA_HOME; unset CLASSPATH
    [ -z "${JAVA_HOME}" ] && . /etc/profile.d/openjdk6.sh
    [ -z "${MOZ_PLUGIN_PATH}" ] && . /etc/profile.d/mozilla-common.sh
    [ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
    cd ${srcdir}/ooo-build-${_GOver}
    # our ArchLinux distribution patch until we go upstream
    patch -Np0 -i ${srcdir}/ArchLinux.patch || return 1
    # buildfix for broken language settings in build
    patch -Np0 -i ${srcdir}/localize-ooo.diff || return 1
    # fix bugs with recent system redland
    patch -Np1 -i ${srcdir}/system-redland.patch || return 1
    # hotfixes not yet upstream
    # cp ${srcdir}/*.diff ${srcdir}/ooo-build-${_GOver}/patches/hotfixes/
    cp ${srcdir}/buildfix_64bit_system_libjpeg.diff ${srcdir}/ooo-build-${_GOver}/patches/hotfixes/
    # export C(XX)FLAGS
    # http://www.openoffice.org/issues/show_bug.cgi?id=103205
    unset CFLAGS
    unset CXXFLAGS
    # export ARCH_FLAGS="$CFLAGS"
    if [ "$CARCH" = "x86_64" ]; then
    EXTRAOPTS="--without-stlport"
    else EXTRAOPTS="--with-stlport"
    fi
    # autoreconf
    ./configure --with-distro=ArchLinux \
    --with-build-version="${_GOver} ArchLinux build-${pkgrel} (${_ootag})"\
    --with-srcdir=${srcdir} \
    --with-max-jobs=${MAKEFLAGS/-j/} \
    --with-installed-ooo-dirname="${pkgname}" \
    --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc \
    --with-docdir=/usr/share/doc/packages/"${pkgname}" \
    --mandir=/usr/share/man \
    --with-lang="" \
    --with-dict=ALL\
    --with-binsuffix=no \
    --disable-ldap \
    --enable-cairo\
    --disable-kde\
    --enable-kde4\
    --enable-lockdown\
    --with-system-boost\
    --with-system-cairo\
    --enable-crashdump\
    --without-gpc\
    --enable-opengl \
    --enable-minimizer \
    --enable-presenter-console \
    --enable-pdfimport \
    --enable-wiki-publisher \
    --enable-ogltrans \
    --with-ant-home="/usr/share/java/apache-ant"\
    --with-system-saxon\
    --with-saxon-jar=/usr/share/java/saxon/saxon9he.jar\
    --with-system-lucene\
    --with-lucene-core-jar=/usr/share/java/lucene-core.jar\
    --with-lucene-analyzers-jar=/usr/share/java/lucene-analyzers.jar\
    --with-system-beanshell\
    --with-system-vigra\
    --with-system-altlinuxhyph\
    --with-system-lpsolve\
    $EXTRAOPTS || return 1
    # --with-system-mythes\
    # --with-system-graphite\
    # --with-tag=${_ootag}
    # --enable-report-builder \
    # --with-additional-sections="OOXMLExport"
    unset MAKEFLAGS
    # ./download
    LD_PRELOAD="" make || return 1
    package() {
    cd ${srcdir}/ooo-build-${_GOver}
    LD_PRELOAD="" make DESTDIR=${pkgdir} install || return 1
    # install all built dictionaries from source tree
    pushd ${srcdir}/ooo-build-${_GOver}/build/${_ootag}/dictionaries/unxlng?6.pro/bin/
    for i in `ls -1 dict-??.oxt`; do
    install -D -m644 $i ${pkgdir}/usr/lib/"${pkgname}"/share/extension/install/$i || return 1
    done
    popd
    # install all other built extensions
    pushd ${srcdir}/ooo-build-${_GOver}/build/${_ootag}/solver/320/unxlng?6.pro/bin/
    install -m644 pdfimport/pdfimport.oxt ${pkgdir}/usr/lib/"${pkgname}"/share/extension/install/pdfimport.oxt || return 1
    install -m644 swext/wiki-publisher.oxt ${pkgdir}/usr/lib/"${pkgname}"/share/extension/install/wiki-publisher.oxt || return 1
    install -m644 minimizer/sun-presentation-minimizer.oxt ${pkgdir}/usr/lib/"${pkgname}"/share/extension/install/sun-presentation-minimizer.oxt || return 1
    install -m644 presenter/presenter-screen.oxt ${pkgdir}/usr/lib/"${pkgname}"/share/extension/install/presenter-screen.oxt || return 1
    popd
    # fix unopkg call for mktemp, #15410
    sed -i "s:\/bin\/mktemp:\/usr\/bin\/mktemp:" ${pkgdir}/usr/lib/go-openoffice/program/unopkg || return 1
    #fix http://bugs.archlinux.org/task/17656
    find ${pkgdir} -perm 444 -exec ls -lh {} \;
    find ${pkgdir} -perm 444 -exec chmod 644 {} \;
    find ${pkgdir} -perm 555 -exec ls -lh {} \;
    find ${pkgdir} -perm 555 -exec chmod 755 {} \;
    Last edited by timefairy (2010-04-08 10:41:35)

    jryarch wrote:Thanks for your response, how do I actually run it automated? I'm doing it manual right now, but I suppose that's not the idea.
    I suppose that the function can be run as $1, I don't know (I mean `bash PKGBUILD mksource`). Nevertheless, you know what to do now
    Last edited by flamelab (2010-04-07 11:44:58)

  • [SOLVED] PKGBUILD equivalents for other distros

    I'd like to package some of my tools for other distros - mainly .deb and .rpm based for now.  Ideally, I'd like to not have to build full packages for each distro, but instead host build scripts or equivalents of PKGBUILDs for other distros.  As I am not nearly as well versed in other distros as I am with arch, I'm not sure how to find the needed information to accomplish this.
    To take .deb as an example, the pacman rosetta page suggests debuild is the equivalent tool to makepkg.  However, the debuild man page indicates that debuild can simply be run within the source tree to build a package.  Certainly this can't be the case, unless there are distro-specific files within that source tree that debuild finds and uses.  That man page does not indicate what these files are and how they are written.
    I have found documentation for creating full binary packages for debian-based distros, but is there an equivalent to a PKGBUILD?  I know for Gentoo, ebuilds are well documented and should be quite doable.  But frankly I'm pretty sure most gentoo users wouldn't need my help with those.  I'm currently primarily targeting .deb as many novice linux users that I'd like to make a couple of my tools available to seem to use ubuntoo.
    I suspect I may just be missing the proper documentation and/or am not using the right search terms.  Any nudges in the right direction would be appreciated.
    (edit: marked 'solved' as I now have the information I needed to get started working on this - but more input can always be handy.)
    Last edited by Trilby (2014-01-08 20:34:26)

    I recently discovered Debian's `checkinstall` which is very close to what I was looking for.  One can easily create a script that will download and install a "non-debianized" source package as a .deb that can be managed by dpkg/apt-get.
    Allegedly it can also create rpm packages, but I'm not going to worry about trying that out for a while.
    A simple example of a script to allow debian/*buntu users to install one of my packages can be seen here.  There is an executable script called `makedeb` - guess what it does.  There is also a package-specific file called DEBBUILD - guess what that's for .  With just those two files, a debian user could run the script which would get the needed info from the DEBUILD to install the needed dependencies, download and build the source, install under the watch of checkinstall to a temp directory, have checkinstall build a .deb package, remove the builddeps (and optionally all deps installed during the build), and leave them with a *.deb file ready for dpkg.
    This instance of makedeb was intentionally made generic so it could work for other packages, however it is also *very* simple and so will not work for all other packages.  A DEBBUILD is nearly identical to a PKGBUILD, except the dependency names need to be converted to the debian deps (and there may be many more deps needed as you cannot assume our base/base-devel components are there ... and split -dev packages suck).
    Making this DEBBUILD + makedeb made me wonder how hard it would be to convert our own makepkg over to work on top of apt-get/dpkg.  I've installed debian (crunchbang) on one of my systems to experiment with this.  I've realized there may not be much to it really.  I've just completed my revision to the actual makepkg script (and makepkg.conf) to make a full featured makedeb and makedeb.conf.  It is not yet tested - and once I test it I may find it is not nearly as complete as I had hoped.  But the goal is to allow PKGBUILD -> DEBBUILD conversions to be quite easy (just change the deps).
    I may post my full featured makedeb in "community contributions" if/when it passes a few basic tests.  It will not run on arch, but it is suited for archers who need to make debs.  It may eventually run on arch (there are dpkg is in the AUR, and so is checkinstall, though it is very broken ATM), but this is not a goal of mine.
    Last edited by Trilby (2014-05-30 17:37:40)

  • [Solved] PKGBUILD Update for powerpanel

    This is the third of five packages I'm looking at, per the original post.
    The third package is aur/powerpanel (1.2.3-3). This one was a little curious; it claimed to install a binary under /usr/sbin, but the end package would have no non-'meta' files in it at all (and thus would install nothing). I believe this is due to the use of $startdir in the original PKGBUILD, though I can't be certain.
    Flagged as before, but no inspection of the source as this fetches a pre-built binary from the vendor. No issues so far at my end (and hopefully none for anyone else). Of course, this means that once again, the only affected file was the PKGBUILD, for which I include updates below.
    PKGBUILD.diff (to make a new PKGBUILD) -- In addition to correcting the install path, this fixes an error and several warnings noted by namcap, and also several warnings by makepkg.
    Edited 09 June 2013 per Scimmia [#1285083]
    --- PKGBUILD 2013-02-14 19:26:52.000000000 +1100
    +++ PKGBUILD 2013-06-09 14:30:24.034932202 +1000
    @@ -2,68 +2,70 @@
    pkgname=powerpanel
    pkgver=1.2.3
    pkgrel=3
    -pkgdesc="PowerPanel for Linux software can be used with most CyberPower UPS products."
    -arch=("x86_64" "i686")
    -url="http://www.cyberpowersystems.com"
    +pkgdesc="This Linux package can be used with most CyberPower UPS products."
    +arch=('x86_64' 'i686')
    +url="http://www.cyberpowersystems.com/"
    license=("custom:CyberPower")
    -depends=('libusb')
    -source=(http://www.cyberpowersystems.com/software/powerpanel_123_x86_64.tar.gz pwrstatd.service)
    +depends=('bash')
    +source=(pwrstatd.service)
    backup=(etc/powerpanel/pwrstatd-{powerfail,lowbatt,email}.sh
    etc/pwrstatd.conf)
    if [ $CARCH = 'x86_64' ]; then
    - md5sums=('0226b17e9470b93cd1e4fd2f149c5d05'
    - '1d92c092af4bbb55add35d30c6b37252')
    +source+=("http://www.cyberpowersystems.com/software/powerpanel_123_x86_64.tar.gz")
    +md5sums=('1d92c092af4bbb55add35d30c6b37252'
    + '0226b17e9470b93cd1e4fd2f149c5d05')
    fi
    if [ $CARCH = 'i686' ]; then
    -source=(http://www.cyberpowersystems.com/software/powerpanel_123_i386.tar.gz)
    - md5sums=('79d1b60f5146b5286c786c93b90e6c87'
    - '1d92c092af4bbb55add35d30c6b37252')
    +source+=("http://www.cyberpowersystems.com/software/powerpanel_123_i386.tar.gz")
    +md5sums=('1d92c092af4bbb55add35d30c6b37252'
    + '79d1b60f5146b5286c786c93b90e6c87')
    fi
    -build() {
    - cd $startdir/src/$pkgname-$pkgver-0
    -# copy files
    +package() {
    +
    +# File install operations.
    # PowerPanel for Linux client program
    -install -Dm755 bin/pwrstat $startdir/pkg/usr/bin/pwrstat
    +install -Dm755 "$srcdir/$pkgname-$pkgver-0/bin/pwrstat" "$pkgdir/usr/bin/pwrstat"
    # PowerPanel for Linux daemon program
    -install -Dm755 bin/pwrstatd $startdir/pkg/usr/sbin/pwrstatd
    +install -Dm755 "$srcdir/$pkgname-$pkgver-0/bin/pwrstatd" "$pkgdir/usr/bin/pwrstatd"
    # PowerPanel for Linux daemon configuration
    -install -Dm600 conf/pwrstatd.conf $startdir/pkg/etc/pwrstatd.conf
    -sed -e 's#/etc#/etc/powerpanel#' -i $startdir/pkg/etc/pwrstatd.conf
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/conf/pwrstatd.conf" "$pkgdir/etc/pwrstatd.conf"
    +sed -e 's#/etc#/etc/powerpanel#' -i "$pkgdir/etc/pwrstatd.conf"
    # Script command for event of power failure
    -install -Dm755 script/pwrstatd-powerfail.sh $startdir/pkg/etc/powerpanel/pwrstatd-powerfail.sh
    +install -Dm755 "$srcdir/$pkgname-$pkgver-0/script/pwrstatd-powerfail.sh" "$pkgdir/etc/powerpanel/pwrstatd-powerfail.sh"
    # Script command for event of battery low
    -install -Dm755 script/pwrstatd-lowbatt.sh $startdir/pkg/etc/powerpanel/pwrstatd-lowbatt.sh
    +install -Dm755 "$srcdir/$pkgname-$pkgver-0/script/pwrstatd-lowbatt.sh" "$pkgdir/etc/powerpanel/pwrstatd-lowbatt.sh"
    # Script command for e-mail notification
    -install -Dm755 script/pwrstatd-email.sh $startdir/pkg/etc/powerpanel/pwrstatd-email.sh
    +install -Dm755 "$srcdir/$pkgname-$pkgver-0/script/pwrstatd-email.sh" "$pkgdir/etc/powerpanel/pwrstatd-email.sh"
    # Script command for Daemon startup control
    -install -Dm755 script/arch_pwrstatd $startdir/pkg/etc/rc.d/pwrstatd
    +install -Dm755 "$srcdir/$pkgname-$pkgver-0/script/arch_pwrstatd" "$pkgdir/etc/rc.d/pwrstatd"
    # Systemd unit
    -install -Dm644 ../pwrstatd.service $startdir/pkg/usr/lib/systemd/system/pwrstatd.service
    +install -Dm644 pwrstatd.service "$pkgdir/usr/lib/systemd/system/pwrstatd.service"
    # PowerPanel for Linux client man-page
    -install -Dm644 doc/pwrstat.8 $startdir/pkg/usr/share/man/man8/pwrstat.8
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/pwrstat.8" "$pkgdir/usr/share/man/man8/pwrstat.8"
    # PowerPanel for Linux daemon man-page
    -install -Dm644 doc/pwrstatd.8 $startdir/pkg/usr/share/man/man8/pwrstatd.8
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/pwrstatd.8" "$pkgdir/usr/share/man/man8/pwrstatd.8"
    -# compress the man page file
    -gzip -9 $startdir/pkg/usr/share/man/man8/pwrstat.8
    -gzip -9 $startdir/pkg/usr/share/man/man8/pwrstatd.8
    +# PowerPanel license file
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/LICENSE" "$pkgdir/usr/share/licenses/powerpanel/LICENSE"
    +# PowerPanel additional documentation
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/README" "$pkgdir/usr/share/doc/powerpanel/README"
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/deploy-guide" "$pkgdir/usr/share/doc/powerpanel/deploy-guide"
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/install-guide" "$pkgdir/usr/share/doc/powerpanel/install-guide"
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/user-manual" "$pkgdir/usr/share/doc/powerpanel/user-manual"
    +}
    A fair number of changes, but mostly straightforwards, and I did otherwise try and make as few changes as possible to the original PKGBUILD. Again, any (constructive) feedback is welcome. I will of course add a comment to the package page in AUR noting this topic.
    Last edited by aexoxea (2013-06-10 04:42:08)

    Scimmia wrote:
    "md5sums+=" works, too.
    I would try to include $pkgver in the source array, something like ${pkgver//./} to get rid of the dots. That way you only have to update the pkgver at the top on an update.
    [#1285717]
    Good point about the md5sums= and also about using variables in the source= (which I note a number of packages indeed do).
    As it is, the maintainer has yesterday updated the PKGBUILD (using only some of the changes from the above), so I'm going to mark this thread as 'solved', but will take note of everything above for future PKGBUILDs that I write or modify (I'm sure this one won't be the last).

  • [SOLVED] makepkg git clone fails (firewalled), how to use https

    At my new employer git(hub) traffic has been blocked so I am unable to clone a repo with "git clone git://someurl/..." but I can clone via https "git clone https://someurl/..."
    However, makepkg uses the former and fails with the following error:
    Cloning into bare repository '/tmp/cower-git/cower' ...
    fatal: unable to connect to github.com:
    github.com[0: 192.30.252.130]: errno=Connection refused
    Can I configure makepkg to use https cloning?  I can edit makepkg itself, but this seems far from ideal.
    For the time being, I just cd'ed into 'src' and manually cloned via https, then backed out and used 'makepkg -ei'.  So I now have cower up and running, but this is a bit tedius to do for all git packages.

    Change it how?  I tried changing it to "https://github..." but then makepkg didn't treat it as a git repo and just downloaded the webpage.
    EDIT: nevermind, I'm an idiot:
    source=("git+https://github/...")
    I know I had done this before, but I wasn't finding it when I needed it.  Thanks.
      - Trilby: Moderator and Noob!

  • [SOLVED] PKGBUILD /lib exists in filesystem

    Apologies for the similar thread...
    I know there's a lot of topics similar to this with particular files conflicting with various packages when installing, but I couldn't quite see the issue with my PKGBUILD.
    PKGBUILD contents (without the vars):
    package() {
    # Unpack the vendor package
    cd "${srcdir}"
    tar -zxf data.tar.gz
    cp -dpr "${srcdir}/usr" "${pkgdir}"
    install -Dm0644 "${pkgdir}/usr/share/doc/vpn-unlimited/copyright" \
    "${pkgdir}/usr/share/licenses/${pkgname}/copyright"
    # Create a custom script that forces the older libcurl
    cat > "${pkgdir}/usr/bin/vpnu" <<- EOF
    #!/bin/sh
    PID=$(pidof vpn-unlimited-daemon)
    if [[ $EUID -ne 0 ]]; then
    echo "Must be root to run VPN daemon" 1>&2
    exit 1
    else
    if [ -z $PID]; then
    vpn-unlimited-daemon &
    sleep 2
    fi
    LD_PRELOAD=libcurl.so.3 vpn-unlimited
    fi
    EOF
    # Change script permissions
    chmod 0755 "${pkgdir}/usr/bin/vpnu"
    # Alter the desktop file to launch our script instead
    sed -i 's/Exec=vpn-unlimited/Exec=vpnu/g' "${pkgdir}/usr/share/applications/vpn-unlimited.desktop"
    # Add our custom systemd unit
    install -Dm0644 "${srcdir}/vpn-unlimited-daemon.service" "${pkgdir}/lib/systemd/system/vpn-unlimited-daemon.service"
    # Save this original file
    cp -p "${srcdir}/etc/init.d/vpn-unlimited-daemon" "${pkgdir}/usr/share/doc/vpn-unlimited/"
    While building:
    vpn-unlimited: /lib exists in filesystem
    vpn-unlimited: /usr/sbin exists in filesystem
    Errors occurred, no packages were upgraded.
    I don't understand why the problem is the symbolic links at /lib and /usr/sbin. Doesn't cp -dpr follow the symlinks?
    Last edited by adb (2015-01-11 22:37:32)

    Can someone help me changing the PKGBUILD from tm_smapi-ck?
    I am getting the same error message:
    (1/1) checking for file conflicts [###########################] 100%
    error: failed to commit transaction (conflicting files)
    tp_smapi-ck: /lib exists in filesystem
    Errors occurred, no packages were upgraded.
    PKGBUILD:
    # Maintainer: fackamato
    # Contributor: Steven Davidovitz <steviedizzle ð gmail đ com>
    # Contributor: Nick B <Shirakawasuna ð gmail đ com>
    # Contributor: Christof Musik <christof ð senfdax đ de>
    # Contributor: Stefan Rupp <archlinux ð stefanrupp đ de>
    # Contributor: Ignas Anikevicius <anikevicius ð gmail đ com>
    _pkgname=tp_smapi
    # make the AUR parser think the following lines are comments
    # to bypass the buggy parser check
    [[ "#" ]] && _kernext=${_kernext:-}
    [[ "#" ]] && _kernver=${_kernver:-$(uname -r)}
    [[ "#" ]] && _extramodules=$(readlink -f "/usr/lib/modules/$_kernver/extramodules" | sed 's#^/usr/lib/modules/##')
    [[ "#" ]] && _kernver=$(< /usr/lib/modules/$_extramodules/version)
    pkgname=$_pkgname-ck$_kernext
    pkgver=0.41
    pkgrel=44
    pkgdesc="Modules for ThinkPad's SMAPI functionality, for -ck kernels"
    [[ -n $_kernext ]] && pkgdesc+=" (for linux$_kernext)"
    arch=('i686' 'x86_64')
    url="http://tpctl.sourceforge.net/"
    license=('GPL')
    depends=("linux$_kernext-ck")
    makedepends=("linux$_kernext-headers")
    install=$_pkgname-ck.install
    source=(https://github.com/downloads/evgeni/tp_smapi/tp_smapi-$pkgver.tar.gz)
    md5sums=('63c683415c764568f6bf17c7eabe4752')
    sha256sums=('6aef02b92d10360ac9be0db29ae390636be55017990063a092a285c70b54e666')
    build() {
    cd "$srcdir/tp_smapi-$pkgver"
    sed -ri "s/^(KVER\s*:=).*$/\1$_kernver/" Makefile
    make HDAPS=1
    package() {
    make -C "/lib/modules/$_kernver/build" \
    INSTALL_MOD_PATH="$pkgdir" M="$srcdir/$_pkgname-$pkgver" modules_install
    cd "$pkgdir/lib/modules/"
    mv "$_kernver/extra" "$_extramodules"
    rmdir "$_kernver"
    # compress kernel modules
    find "$pkgdir" -name "*.ko" -exec gzip -9 {} +
    # update kernel version in install file
    sed -ri "s/^(extramodules=).*$/\1$_extramodules/" "$startdir/$_pkgname-ck.install"
    Thanks in advance!

  • [SOLVED]PKGBUILD change to install to /usr/bin

    I have this package installed and it needs to be changed to install to /usr/bin, now it installs to usr/sbin. I really dont know much about this so if someone could point out what i need to change i would appreciate it.
    https://aur.archlinux.org/packages/?O=0 … fsarchiver
    # qt4-fsarchiver by Francois Dupoux, Hihin Ruslan and Dieter Baum
    # PKGBUILD by hasufell, updated by DaarkWel
    pkgname=qt4-fsarchiver
    pkgver=0.6.17_3
    pkgrel=1
    pkgdesc='GUI for fsarchiver'
    arch=('i686' 'x86_64')
    url='http://sourceforge.net/projects/qt4-fsarchiver/'
    license=('GPL')
    depends=('fsarchiver' 'gksu')
    makedepends=('qt4')
    source=("http://sourceforge.net/projects/${pkgname}/files/source/${pkgname}-${pkgver//_/-}.tar.gz")
    sha1sums=('8b474af6fd81d604f357348567608f450dbe83e7')
    build() {
    cd "${srcdir}/${pkgname}"
    qmake-qt4
    package() {
    cd "${srcdir}/${pkgname}"
    make
    make INSTALL_ROOT="${pkgdir}" install
    mkdir -p ${pkgdir}/usr/share/qt/translations
    rm -R ${pkgdir}/usr/share/qt4
    install -D -m644 ${srcdir}/${pkgname}/translations/*.qm ${pkgdir}/usr/share/qt/translations
    sed s/Terminal=true/Terminal=false/ -i ${pkgdir}/usr/share/applications/qt4-fsarchiver.desktop
    sed s/sudo/gksu/ -i ${pkgdir}/usr/share/applications/qt4-fsarchiver.desktop
    Last edited by cecar (2013-06-04 13:22:28)

    There is a problem in that PKGBUILD. The make shouldn't be in the package function. It should be in the build function, just after qmake-qt4.
    And the qmake project hard codes the destination to /usr/sbin. In that case, the correct PKGBUILD should be:
    # qt4-fsarchiver by Francois Dupoux, Hihin Ruslan and Dieter Baum
    # PKGBUILD by hasufell, updated by DaarkWel
    pkgname=qt4-fsarchiver
    pkgver=0.6.17_3
    pkgrel=1
    pkgdesc='GUI for fsarchiver'
    arch=('i686' 'x86_64')
    url='http://sourceforge.net/projects/qt4-fsarchiver/'
    license=('GPL')
    depends=('fsarchiver' 'gksu')
    makedepends=('qt4')
    source=("http://sourceforge.net/projects/${pkgname}/files/source/${pkgname}-${pkgver//_/-}.tar.gz")
    sha1sums=('8b474af6fd81d604f357348567608f450dbe83e7')
    build() {
    cd "${srcdir}/${pkgname}"
    qmake-qt4
    make
    package() {
    cd "${srcdir}/${pkgname}"
    make INSTALL_ROOT="${pkgdir}" install
    mkdir -p ${pkgdir}/usr/share/qt/translations
    rm -R ${pkgdir}/usr/share/qt4
    install -D -m644 ${srcdir}/${pkgname}/translations/*.qm ${pkgdir}/usr/share/qt/translations
    # workaround for fixed destination path in qmake project
    mkdir -p ${pkgdir}/usr/bin
    mv ${pkgdir}/usr/sbin/qt4-fsarchiver ${pkgdir}/usr/bin/
    rmdir ${pkgdir}/usr/sbin
    sed s/Terminal=true/Terminal=false/ -i ${pkgdir}/usr/share/applications/qt4-fsarchiver.desktop
    sed s/sudo/gksu/ -i ${pkgdir}/usr/share/applications/qt4-fsarchiver.desktop

  • [Solved] PKGBUILD Update for ufs-tools

    This is the second of five packages I'm looking at, per the original post.
    This time, the package is aur/ufs-tools (0.1-1), which installs a binary under /sbin. Flagged as before, no apparent hard-coded paths in the source, and it seems to be operable from /usr/bin, so once again, only a build issue. The only affected file here is the PKGBUILD, for which I include updates below.
    PKGBUILD.diff (to make a new PKGBUILD) -- In addition to correcting the install path, this fixes an error and several warnings noted by namcap, and also a warning by makepkg about the lack of a package() function.
    Edited 09 June 2013 per Scimmia [#1285088]
    --- PKGBUILD 2011-07-12 01:10:50.000000000 +1000
    +++ PKGBUILD 2013-06-09 13:48:15.088487843 +1000
    @@ -4,13 +4,11 @@
    pkgver=0.1
    pkgrel=1
    pkgdesc="Utility for creating UFS 1 & 2 filesystems on Linux"
    -arch=(i686 x86_64)
    -# http://downloads.sourceforge.net/project/ufs-linux/ufs-tools/0.1/ufs-tools-0.1.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fufs-linux%2F&ts=1309898303&use_mirror=voxel
    +arch=('i686' 'x86_64')
    url="http://ufs-linux.sourceforge.net/"
    license=('GPL')
    -depends=(gcc libbsd)
    -#install=
    -source=(http://downloads.sourceforge.net/project/ufs-linux/ufs-tools/0.1/$pkgname-$pkgver.tar.bz2
    +depends=('libbsd')
    +source=("http://downloads.sourceforge.net/project/ufs-linux/ufs-tools/0.1/$pkgname-$pkgver.tar.bz2"
    ufs-tools.patch)
    md5sums=('c4a78473c8b5267b2799b53c878edaad'
    @@ -18,15 +16,19 @@
    build() {
    cd "$srcdir/$pkgname-$pkgver"
    +
    patch -p1 < ../ufs-tools.patch
    +
    cd libufs
    - make || return 1
    + make
    +
    cd ..
    - make # DESTDIR="$pkgdir/" install
    - mkdir -p $pkgdir/sbin
    - mkdir -p $pkgdir/usr/lib
    - cp $srcdir/$pkgname-$pkgver/libufs/libufs.so.1.0 $pkgdir/usr/lib/.
    - ln -s $pkgdir/usr/lib/libufs.so.1.0 $pkgdir/usr/lib/libufs.so.1
    - cp $srcdir/$pkgname-$pkgver/mkufs $pkgdir/sbin/.
    + make
    +}
    +
    +package() {
    + install -D "$srcdir/$pkgname-$pkgver/libufs/libufs.so.1.0" "$pkgdir/usr/lib/libufs.so.1.0"
    + ln -rs "$pkgdir/usr/lib/libufs.so.1.0" "$pkgdir/usr/lib/libufs.so.1"
    +
    + install -D "$srcdir/$pkgname-$pkgver/mkufs" "$pkgdir/usr/bin/mkufs"
    If you wanted a 'mkfs.ufs' similar to the other tools, you could also include this line in the new PKGBUILD as the last instruction before the closing brace of package(); I could not determine for certain if this would conflict with a file in any other package, but I do not believe it should (unless there is a different package providing UFS tools). I didn't include it above however to avoid the risk, and also as it was not in the original PKGBUILD:
    ln -rs "$pkgdir/usr/bin/mkufs" "$pkgdir/usr/bin/mkfs.ufs"
    Any (constructive) feedback is welcome; I tried to make as few changes as possible to the original PKGBUILD, so apologies if I missed correcting/adjusting other things that should have been changed as well. I will of course add a comment to the package page in AUR noting this topic.
    Last edited by aexoxea (2015-05-13 13:36:21)

    Scimmia wrote:
    Get rid of "|| return 1", it's no longer needed.
    Don't just cp a file. Use install if it's individual files or cp -a if it's an entire dir structure. Install will also make the dest dirs for you with the -D option, so get rid of the mkdir commands as well.
    Quote all paths which include variables.
    [#1285088]
    Changes made (and now reflected in the OP), and these points noted for future work. The feedback is much appreciated .

  • [SOLVED] PKGBUILD for a perl application (gscan2pdf)

    Hello, I'm the maintainer of the package gscan2pdf and I have some problems to update the PKGBUILD
    for the version 1.2.0. I'm a beginner, so perhaps I missed something that is well-known. The build() function contains
    the following:
    perl Makefile.PL
    make
    make DESTDIR=${pkgdir} install
    But unfortunately it doesn't work. I get the following error when I run makepkg:
    ln: target ‘usr/bin/’ is not a directory: No such file or directory
    ==> ERROR: A failure occurred in build().
    Aborting...
    By the way, the PKGBUILD is:
    # Maintainer: Tristelune <tristelune1 at gmail dot com>
    # Contributor: LeCrayonVert <greenarrow at archlinux dot us>
    # Contributor: yugrotavele <yugrotavele at archlinux dot us>
    # Contributor: Sven Salzwedel <[email protected]>
    # Contributor: Olaf Leidinger <[email protected]>
    pkgname=gscan2pdf
    pkgver=1.2.0
    pkgrel=1
    pkgdesc='A GUI to produce a multipage PDF from a scan'
    arch=('i686' 'x86_64')
    url='http://gscan2pdf.sourceforge.net/'
    license=('GPL')
    depends=('xsane' 'gtk2-perl' 'perl-locale-gettext' 'libtiff' 'sane'
    'perl-gtk2-ex-simple-list' 'imagemagick' 'perl-config-general>=2.40'
    'perl-pdf-api2' 'perl-goo-canvas' 'perl-gtk2-imageview' 'perl-sane'
    'perl-test-critic' 'perl-set-intspan' 'perl-proc-processtable' 'perl-log-log4perl' 'perl-html-parser' 'perl-try-tiny' 'unpaper' )
    optdepends=('djvulibre' 'gocr' 'ocropus' 'xdg-utils' 'tesseract' 'cuneiform' )
    source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz)
    sha512sums=('98546936ff2b178c8047f46e6b38d0e9244e51cecbbfa69bf3f08d9f71cbbab261e47f8f5514558a892d5e7a178eb67c1cb3db50eb75b5d6a0a08cadb0095a17')
    build() {
    cd ${srcdir}/${pkgname}-${pkgver}
    perl Makefile.PL
    make
    make DESTDIR=${pkgdir} install
    # Create symlinks to /usr/bin/site_perl/* in /usr/bin/
    cd ${pkgdir}
    ln -sf site_perl/gscan2pdf usr/bin/
    ln -sf site_perl/scanadf-perl usr/bin/
    ln -sf site_perl/scanimage-perl usr/bin/
    # Standard perl cleaning
    /usr/bin/find ${pkgdir} -name '.packlist' -o -name 'perllocal.pod' -delete
    package() {
    # Create symlinks to /usr/bin/site_perl/* in /usr/bin/
    cd ${pkgdir}
    ln -sf site_perl/gscan2pdf usr/bin/
    ln -sf site_perl/scanadf-perl usr/bin/
    ln -sf site_perl/scanimage-perl usr/bin/
    After searching what is wrong, I saw some files are installed in the HOME directory of the user, what I don't want to. I was told, I should rather change
    perl Makefile.PL
    make
    make DESTDIR=${pkgdir} install
    to
    perl Makefile.PL INSTALL_BASE=${pkgdir}
    make
    make install
    But I still have the problem. This time, it's the following:
    $ makepkg
    msgfmt -c po/gscan2pdf-ab.po -o /usr/share/locale/ab/LC_MESSAGES/gscan2pdf.mo
    msgfmt -c po/gscan2pdf-bg.po -o /usr/share/locale/bg/LC_MESSAGES/gscan2pdf.mo
    msgfmt -c po/gscan2pdf-ca.po -o /usr/share/locale/ca/LC_MESSAGES/gscan2pdf.mo
    po/gscan2pdf-ab.po:7: warning: header field 'Language' missing in header
    msgfmt: error while opening "/usr/share/locale/ab/LC_MESSAGES/gscan2pdf.mo" for writing: Permission denied
    Makefile:1036: recipe for target '/usr/share/locale/ab/LC_MESSAGES/gscan2pdf.mo' failed
    make: *** [/usr/share/locale/ab/LC_MESSAGES/gscan2pdf.mo] Error 1
    make: *** Waiting for unfinished jobs....
    po/gscan2pdf-be.po:7: warning: header field 'Language' missing in header
    msgfmt: error while opening "/usr/share/locale/be/LC_MESSAGES/gscan2pdf.mo" for writing: Permission denied
    Makefile:1036: recipe for target '/usr/share/locale/be/LC_MESSAGES/gscan2pdf.mo' failed
    make: *** [/usr/share/locale/be/LC_MESSAGES/gscan2pdf.mo] Error 1
    po/gscan2pdf-bg.po:7: warning: header field 'Language' missing in header
    msgfmt: error while opening "/usr/share/locale/bg/LC_MESSAGES/gscan2pdf.mo" for writing: Permission denied
    Makefile:1036: recipe for target '/usr/share/locale/bg/LC_MESSAGES/gscan2pdf.mo' failed
    make: *** [/usr/share/locale/bg/LC_MESSAGES/gscan2pdf.mo] Error 1
    po/gscan2pdf-ca.po:7: warning: header field 'Language' missing in header
    msgfmt: error while opening "/usr/share/locale/ca/LC_MESSAGES/gscan2pdf.mo" for writing: Permission denied
    Makefile:1036: recipe for target '/usr/share/locale/ca/LC_MESSAGES/gscan2pdf.mo' failed
    make: *** [/usr/share/locale/ca/LC_MESSAGES/gscan2pdf.mo] Error 1
    ==> ERROR: A failure occurred in build().
    Aborting...
    It's because during the creation of the PKGBUILD, some files are installed in /usr/share/ rather than usr/share.
    I had a look at the  Makefile.PL and it seems I can specify the location of usr/share with the variables SHAREINSTDIR and
    SHAREDIR. But it's unclear for me If I have to set both. And perhaps the most important question: did I miss some perl Tool or am I going
    in the right direction ?
    Thank you!
    Last edited by Tristelune (2013-12-06 11:52:05)

    I have found the problem. I had the following in my .zshrc:
    export PERL_LOCAL_LIB_ROOT="/home/user/perl5:$PERL_LOCAL_LIB_ROOT";
    export PERL_MB_OPT="--install_base "/home/user/perl5"";
    export PERL_MM_OPT="INSTALL_BASE=/home/user/perl5";
    export PERL5LIB="/home/user/perl5/lib/perl5:$PERL5LIB";
    Without those variables, nothing is installed in my HOME.
    So the package can be updated now!

  • [Solved] PKGBUILD user error prevention vs intrusive sanity checks.

    I read over the AUR packaging standards and am pretty familiar with creating PKGBUILDs but I'm uncertain on how to proceed when I need to check a system file so the user doesn't accidently install a package that may or may not mess up their system. I don't know how I feel about checking a user's system files from within a PKGBUILD. To be more specific; I'm maintaining "util-linux-aes" which is the util-linux package with loop-AES support (via patch). As brought to my attention by 'gemon' on the AUR page: http://aur.archlinux.org/packages.php?ID=47060  I should probably check if user has a kernel with loop-AES (loop.[k]o) patched as it may cause harm to their system if they use util-linux-aes and don't have a patched kernel. I'm somewhat torn about how to address the situation. Should a simple echo message suffice, giving warning about installing or should I insert code (as shown below) to check for proper kernel config options?
    I thought about adding a kernel config check in a util-linux-aes.install file but if it returns or exits with 1 the package still installs. So I had to migrate the check to the PKGBUILD itself (which makes more sense I guess) and I'm not sure if this is considered an "intrusion" and/or unclean method of dealing with this. To make things more clear, here's my proposed PKGBUILD (current PKGBUILD doesn't have the config check):
    # Maintainer: milomouse <vincent[at]fea.st>
    # Contributor: judd <jvinet[at]zeroflux.org>
    _basename=util-linux
    pkgname=${_basename}-aes
    pkgver=2.19
    pkgrel=5
    pkgdesc="Miscellaneous system utilities for Linux, with loop-AES support"
    url="http://userweb.kernel.org/~kzak/util-linux-ng/"
    license=('GPL2')
    arch=('i686' 'x86_64')
    groups=('base')
    depends=('bash' 'ncurses>=5.7' 'zlib' 'filesystem')
    optdepends=('perl: for chkdupexe support')
    provides=('linux32' "util-linux=${pkgver}" "util-linux-ng=${pkgver}")
    conflicts=('linux32' 'util-linux' 'util-linux-ng' 'e2fsprogs<1.41.8-2')
    replaces=('linux32' 'util-linux' 'util-linux-ng')
    options=('!libtool')
    _loopaesdate=20110226
    _loopaesvers=v3.6b
    _loopaesdiff=${_basename}-${pkgver}.diff
    source=(http://www.kernel.org/pub/linux/utils/${_basename}/v${pkgver}/${_basename}-${pkgver}.tar.bz2
    http://downloads.sourceforge.net/project/loop-aes/loop-aes/${_loopaesvers}/loop-AES-${_loopaesvers}.tar.bz2)
    build() {
    cd "${srcdir}/${_basename}-${pkgver}"
    # check for compatability first
    warning "You must also have a loop-AES patched kernel (loop.ko) for this to work."
    warning "You may end up damaging your system otherwise. Checking now..."
    if [[ -f /proc/config.gz ]]; then
    if [[ $(zgrep CONFIG_BLK_DEV_LOOP= /proc/config.gz) == CONFIG_BLK_DEV_LOOP=[ym] && \
    $(zgrep CONFIG_BLK_DEV_LOOP_AES= /proc/config.gz) == CONFIG_BLK_DEV_LOOP_AES=y ]]; then
    msg "Everything looks OK."
    else
    error "CONFIG_BLK_DEV_LOOP / CONFIG_BLK_DEV_LOOP_AES are not correct, aborting!"
    return 1
    fi
    elif [[ -f /usr/src/linux-$(uname -r)/.config ]]; then
    if [[ $(zgrep CONFIG_BLK_DEV_LOOP= /usr/src/linux-$(uname -r)/.config) == CONFIG_BLK_DEV_LOOP=[ym] && \
    $(zgrep CONFIG_BLK_DEV_LOOP_AES= /usr/src/linux-$(uname -r)/.config) == CONFIG_BLK_DEV_LOOP_AES=y ]]; then
    msg "Everything looks OK."
    else
    error "CONFIG_BLK_DEV_LOOP / CONFIG_BLK_DEV_LOOP_AES are not correct, aborting!"
    return 1
    fi
    else
    error "Cannot find a kernel config to check options, aborting build!"
    error "If you're POSITIVE you have a patched kernel, edit PKGBUILD to remove this."
    return 1
    fi
    # if all went well; provide loop-aes support
    patch -Np1 -i "${srcdir}/loop-AES-${_loopaesvers}/${_loopaesdiff}"
    # hardware clock
    sed -e 's%etc/adjtime%var/lib/hwclock/adjtime%' -i hwclock/hwclock.c
    autoreconf
    automake
    ./configure --enable-arch --enable-write --enable-raw --disable-wall --enable-partx
    make
    package() {
    cd "${srcdir}/${_basename}-${pkgver}"
    mkdir -p "${pkgdir}/var/lib/hwclock"
    make DESTDIR="${pkgdir}" install
    md5sums=(
    '590ca71aad0b254e2631d84401f28255' # util-linux-2.19.tar.bz2
    '247e5a909877577bdcd246f8caada689') # loop-AES-v3.6b.tar.bz2
    sha384sums=(
    '05e8e3a2685ff47c57d56bf9d5bfc9cbe5c1fa85200f403c5ccc08676b9b713fc935b3b040d5d5dcd2c5aa14b631f1bd' # util-linux-2.19.tar.bz2
    '48ee55e996464f613d68e04bc661997a846989fef4d8a21fb0647c126c64e5ecdb218a37c75f6d3baccfebb2d89503ea') # loop-AES-v3.6b.tar.bz2
    Is it too much [attempting to help the user] by doing this sort of check, is it considered bad practice?
    Even if it's ok, I don't know if I'm going about checking this correctly, although in my mind it makes sense. Checking against the kernel config, I mean.
    Advice on any of these aspects is appreciated, as I'd hate to think I'd unwittingly let a user harm their computer somehow by not checking or at least warning. Again, my main concern is if this is considered bad practice and if it is what are my alternatives. (if this has been discussed before, I'm sorry, just point me in the right direction, thanks).
    Thanks for reading.
    Last edited by milomouse (2011-03-04 15:51:50)

    milomouse wrote:
    @ngoonee:
    My first instincts told me as such (also noted on AUR page comments), that a user should well know what this package is and what it does and need not be checked against their system, and those without the knowledge shouldn't be messing with it in the first place. But with another user of the package bringing the attention that some poor user might install this without full knowledge of it's implementation and/or thinking this package by itself may provide loop-AES (unknowing of kernel patch) they might fall prey to unbeknownst side-effects.
    I guess a warning message will suffice for sanity's sake [under pre_install(), I guess], as I don't think I should create depends on an AUR kernel with current loop-AES support that I don't maintain myself (otherwise I'd have to follow it's inclusion).
    Thanks for the support, though, albeit a bit rough. But for future reference; is checking a user's system files considered OK or should the same rules as this package apply (user knowledge)? I can't imagine every package installing OK without at least one of them checking against a user's current setup.
    In general I don't think checking the current system is 'okay'. PKGBUILDs are meant to create packages. There's no reason these need to be created on the same system as they will be installed on (perhaps a chroot would be used just for building, or a buildserver). Or maybe someone may have multiple machines which share packages or the cache.
    A depends would be the best option in this case, followed by the warning (the former does not mean the latter is not needed). Your check would fail in the cases I outline in the previous paragraph.

  • [SOLVED] PKGBUILD for a font - xset fails when X not running

    I am working on my second PKGBUILD -- this time for a simple raster font I use.  The PKGBUILD uses a post_install() which does an "xset -fp rehash" after installing the font files, because it seemed like otherwise the font wouldn't show up in X.  Then in tests I found that the install died with errors when I installed my package without X running.  How is this situation normally handled?
    Last edited by scottfial (2010-07-09 08:04:21)

    xset will fail if X isn't running.  Font packages generally have an install file like this:
    # arg 1: the new package version
    post_install() {
    echo -n "Updating font cache... "
    fc-cache -f > /dev/null
    mkfontscale /usr/share/fonts/local
    mkfontdir /usr/share/fonts/local
    echo "done."
    # # arg 1: the new package version
    # # arg 2: the old package version
    post_upgrade() {
    post_install $1
    # # arg 1: the old package version
    post_remove() {
    post_install $1
    The user can then either run xset manually or logout/login after installation.

  • [Solved] PKGBUILD for a Wine driven program - read&write permissions

    Hello everybody,
    I have stumbled upon a tricky problem when following these guidelines: https://wiki.archlinux.org/index.php/Wi … bin_script My problem is: The program needs to read a big folder which should stay in /opt and ist linked to ~/. Copying instead of linking is not an option due to big file size. However, the big folder has a small subfolder which should have write access for the user. Any hints on how to manage this?
    Thanks for any hints,
    PhotonX
    edit: Problem solved by creating the big directory in ~/, then linking all subdirectories with read access only and copying all subdirectories with read&write access.
    Last edited by PhotonX (2014-07-09 07:08:26)

    In system preferences on both macbook's , you need to go to file sharing and making sure it's on for both ,click on options and enable smb for windows. follow instructions. I am assuming that the external drive has windows formate on it.

  • [SOLVED]PKGBUILD - source=() and urls with get parameters

    I tryed to compile pyflakes from AUR yesterday, and it had a `source=(http://divmod.org/trac/attachment/wiki/SoftwareReleases/$pkgname-$pkgver.tar.gz?format=raw LICENSE)` the problem is that makepkg checks for "$pkgname-$pkgver.tar.gz?format=raw" and the file name is "$pkgname-$pkgver.tar.gz", any fix for that? - I just removed "?format=raw" and it worked, but the author must had a reason for that parameter
    Last edited by hack.augusto (2010-11-24 18:17:21)

    I wrapped it with double quotes and it worked , I've also added a note on the wiki page.
    thanks

  • [solved] makepkg -o and GIT-package

    makepkg -o / --nobuild
    This command downloads and extracts files only.
    But in case of a PKGBUILD which clones the src from a GIT-repository the behavior is different (it downloads nothing).
    Do you think I should write a bugreport? Or is there another command I don't know?
    Last edited by Radioactiveman (2011-09-12 20:23:12)

    I think that that's behaving as expected, all of the -git PKGBUILDs I've seen pull the source from git inside the build() function which means it would take a change to makepkg and a rewrite of all the PKGBUILDs which pull from any kind of VCS for it to be possible to do what you want.

  • Adcfgclone.pl dbTier is not prompting for ORACLE_HOME variable

    hi,
    adcfgclone.pl is not prompting for ORACLE_HOME variable.
    and erroring out with
    Checking the port pool 12
    done: Port Pool 12 is free
    Report file located at /appsutil/out/portpool.lst
    RC-00203: Unable to create/write to file /appsutil/out/portpool.lst.
    Complete port information available at /appsutil/out/portpool.lst
    RC-50004: Error occurred in CloneContext:
    AC-00005: No write permissions for creating the Context file - /appsutil/temp.xml
    Raised by oracle.apps.ad.context.AppsContext
    Check Clone Context logfile /mnt/ebs/PTCH/bin/db/tech_st/12.1.0/appsutil/clone/bin/CloneContext_0421032159.log for details.
    ERROR: Context creation not completed successfully.
    For additional details review the file /tmp/adcfgclone_6999.err if present.
    DOC refrred: How To Quick Solve This Post Clone Error : RC-50004, AC-00005: No Write Permissions For Creating The Context file - /tmp/temp.xml ? (Doc ID 842948.1)
    in the above DOC please let me know how to perform ANALYSIS part..
    Database version: 12.1.0.2.0
    Applications version: 12.1.3
    OS                         : OEL6.4
    please suggest
    Thanks
    Raghavendra

    are you able to create a file with os user which is running the rapidclone in /appsutil/temp.xml
    please check and update
    use touch command to create a file
    did you gave correct oracle home when prompted by rapidclone ?
    If you have set the right permissions at /tmp and the problem remains then check if at the post cloning steps at the dbTier, the scripts asks for the "Oracle Database Home"
    Target System RDBMS ORACLE_HOME Directory [/u01/clone/db/11.2.0/] :
    post the output of below command
    $ls -ltr ( in appsutil folder )
    AppsMasti
    sharing is Caring

Maybe you are looking for

  • How do you stop a movie from playing past the end?

    I uploaded a video to Vimeo I made from various clips and there was about 40 seconds of black after the end. How do you add a marker so it knows where to stop and hopefull return to the beginning. I already put the 'stop' marker in but it plays past

  • Can you connect two iphones to one itunes account

    I am thinking about getting a new iphone. my husband already had one attached to my itunes account. Can i also attached a new phone to the exsiting account? Can two iphones be connected to one itunes account?

  • PO creation through transaction code ME25 (vendor unknown) - reg.

    Dear all, When I'm doing excercise using transaction code ME25 (PO creation - vendor unknown), the system shows the error message as "Item category not allowed with document type". How to overcome this issue. Plz do the needful at the earliest. Regar

  • How to make a timeline!

    I need help making a timeline. A step by step instruction guide would be most helpful. Thank you!

  • Vendor master creation postal code mandatory through LSMW

    Dear Expert Postal code is mandatory while create vendor master record through LSMW, but while create manually system is not asking the postal code, mean not mandatory. please can tell why? Regards karan