First PKGBUILD, Faulty when Installed by Pacman?

I'm trying to package this:
Enigma-dev (git)
http://enigma-dev.org/
I'm having a problem with it when it gets installed by pacman, where it tries to compile itself again..
PKGBUILD:
pkgname=enigma-dev-git
pkgver=0.0.0
pkgrel=1
pkgdesc="ENIGMA, the Extensible Non-Interpreted Game Maker Augmentation."
url="http://enigma-dev.org"
arch=('x86_64' 'i686')
license=('GPL')
depends=('alure' 'zlib' 'openal' 'libx11' 'libgl' 'mesa' 'gtk2' 'dumb' 'jre7-openjdk') # gcc in base-devel, not required to be listed.
optdepends=()
makedepends=('git' 'python')
conflicts=('lateralgm')
provides=('lateralgm')
replaces=()
backup=()
source=('http://enigma-dev.org/docs/wiki/images/4/47/Lateralgmlogo.png') # putting the git url in here causes the python configuration to fail for some reason..
md5sums=('e6daacba04f0491b256f8a4d2cc9181a')
build() {
if [[ -d $pkgname ]]; then
msg "previous cloned repo detected, removing"
rm -rf $pkgname
fi
msg "Cloning git repo.."
git clone git://github.com/enigma-dev/enigma-dev.git ${pkgname}
cd "${srcdir}/${pkgname}"
msg "Starting python config.."
python install.py
cd "${srcdir}/${pkgname}/ENIGMAsystem/SHELL/"
msg "Starting compile.."
# make # fix for some errors.. stopped happening, so commenting this out.
cd "${srcdir}/${pkgname}"
make
pkgver () {
# this doesn't really work because pkgver is executed before build, so there is no local repo. and there is no apparent way to get remote revision numbers if there are no tags..
# I tried cloning the repo here instead of in build, but that didn't work either.. so basically this only returns anything useful if you try and install it twice.
cd "${srcdir}/${pkgname}"
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
package() {
cd "${srcdir}/${pkgname}"
install -Dm644 ./pluginsource/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
cp -r ./packages/linux/usr/share "${pkgdir}/usr"
cp -r ./packages/linux/usr/bin "${pkgdir}/usr/bin"
cp -r "${srcdir}/${pkgname}" "${pkgdir}/usr/share/${pkgname}"
cd "${pkgdir}/usr/share/applications/"
cat <<EOF > lateralgm.desktop # a quick hack for a lateralgm.desktop
[Desktop Entry]
Type=Application
Name=LateralGM
Exec=lateralgm
Comment=Game Development IDE for Enigma written in java
Icon=lateralgm
Terminal=false
Path=/usr/bin/
Categories=Application;Development;IDE;
StartupNotify=false
MimeType=application;application/x-gm81;application/x-gmk;application/x-gm6;application/x-gmd;application/x-egm;application/x-gm50;application/x-gm51;application/x-gm52;application/x-gm53;application/x-gm60;application/x-gm61;application/x-gm71;application/x-gm80;application/x-gm81;
EOF
chmod +x lateralgm.desktop
chmod +x enigma-dev.desktop
cd "${pkgdir}/usr/bin/"
cat <<EOF > lateralgm # and another so lateralgm exists in $PATH
# excute lateralgm jar file.
cd /usr/share/$pkgname/ # fix for strange bug, where you have to be in the same directory as lgm12b4.jar.
java -jar lgm16b4.jar
EOF
chmod +x lateralgm
cd ${pkgdir}
mkdir -p ./usr/share/icons/hicolor/128x128/apps/
mkdir -p ./usr/share/icons/hicolor/scalable/apps/
mv "${startdir}/Lateralgmlogo.png" ${pkgdir}/usr/share/icons/hicolor/128x128/apps/lateralgm.png
cd "${pkgdir}/usr/share/"
cp ./pixmaps/enigma-dev.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/enigma-dev.svg"
# remove some extra stuff to help reduce package size; more of this is may be possible.
rm -rf "${pkgdir}/usr/share/${pkgname}/packages"
# vim:set ts=2 sw=2 et:
based of these installation directions:
http://enigma-dev.org/docs/Wiki/Install:Git
(which I have followed and work fine)
For one thing, there doesn't seem to be a install target for make, so I just copied the whole thing into /usr/share/ 
My main problem is that normally the compilation is handeld by the java lateralgm program the first time it's run, though just running make works fine.
until pacman installs it, that is.
It still works after being copied, I can run it in $srcdir/enigma-dev-git/ ,
but when I try and run it both by just running lateralgm and cd ing to /usr/share/enigma-dev-git/ then java -jar lgm16b4.jar it will try and compile enigma like it never was compiled in the first place (of course, it can't because it doesn't have root permissions)..
I didn't see any diference in the permissions between $srcdir/enigma-dev-git/ and /usr/share/enigma-dev-git.
I even tried having it install into ~/ with pacman just to see what happened but same thing..
However, I can copy the contence of $srcdir to ~/ and it will work..
Anyone know what might be the issue? (or how to improve anything else?)
Thanks
Last edited by gandalf3 (2013-05-23 18:37:36)

Scimmia wrote:
Have you tried simply dumping the whole thing to opt and putting a script in /usr/bin to run the necessary command? Just what all are you trying to copy to /usr and /usr/bin, anyway? It could very well be as simple as
cd /opt/enigma-dev
java -jar lgm16b4.jar
Of course as Josh @ Dreamland points out, you need to make sure /opt/enigma-dev is world writable.
That is exactly what is going into /usr/bin..
Anyway, I get the same error when trying to run the jarfile directly, so it's  not the /usr/bin script..
As for /usr, it's just all the icons and stuff that is in $srcdir/enigma-dev/packages/linux/usr/share
ah.. so do have to change the permissions of /opt/enigma-dev-git..
I thought that scince it was already compiled it wouldn't have to write anything to /opt/enigma-dev-git.. (I thought that it was lateralgm doing the writing when it compiled enigma, and I didn't have to worry because it already was compiled by then)
I guess I misunderstood, I'm trying it now with permissions.
EDIT:
Seems to work, but is it AUR worthy?
Here's where everything is now:
PKBGUILD:
pkgname=enigma-dev-git
pkgver=0.0.0
pkgrel=1
pkgdesc="ENIGMA, the Extensible Non-Interpreted Game Maker Augmentation."
url="http://enigma-dev.org"
arch=('x86_64' 'i686')
license=('GPL')
depends=('alure' 'zlib' 'openal' 'libx11' 'libgl' 'mesa' 'gtk2' 'dumb' 'java-runtime') # gcc also a dependency, but in base-devel.
optdepends=()
makedepends=('git' 'python')
conflicts=('lateralgm')
provides=('lateralgm')
replaces=()
backup=()
install='enigma-dev-git.install'
source=('lateralgm' 'lateralgm.desktop' 'git://github.com/enigma-dev/enigma-dev.git' 'http://enigma-dev.org/docs/wiki/images/4/47/Lateralgmlogo.png') # putting the git url in here causes the python configuration to fail for some reason..
md5sums=('c41602b12926d8462fb1cdb4753e4be7' 'd4894261248f2657614a177cd1a94bc3' 'SKIP' 'e6daacba04f0491b256f8a4d2cc9181a')
build() {
cd "${srcdir}/enigma-dev"
msg "Starting python config.."
python install.py
cd "${srcdir}/enigma-dev/ENIGMAsystem/SHELL/"
msg "Starting compile.."
# make # fix for some errors.. stopped happening, so commenting this out.
cd "${srcdir}/enigma-dev"
make
pkgver () {
cd "${srcdir}/enigma-dev"
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
package() {
mkdir "${pkgdir}/opt/"
install -Dm644 "${srcdir}/enigma-dev/pluginsource/COPYING" "$pkgdir/usr/share/licenses/$pkgname/COPYING"
cp -r -a "${srcdir}/enigma-dev/packages/linux/usr/share" "${pkgdir}/usr"
cp -r -a "${srcdir}/enigma-dev/packages/linux/usr/bin" "${pkgdir}/usr/bin"
cp -r -a "${srcdir}/enigma-dev" "${pkgdir}/opt/${pkgname}"
cd "${pkgdir}/usr/bin/"
install -D "${srcdir}/lateralgm" "${pkgdir}/usr/bin/lateralgm"
chmod +x "${pkgdir}/usr/bin/lateralgm"
install -D "${srcdir}/lateralgm.desktop" "${pkgdir}/usr/share/applications/lateralgm.desktop"
install -D "${srcdir}/Lateralgmlogo.png" ${pkgdir}/usr/share/icons/hicolor/128x128/apps/lateralgm.png
install -D "${pkgdir}/usr/share/pixmaps/enigma-dev.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/enigma-dev.svg"
# remove some extra stuff to help reduce package size; more of this is may be possible.
rm -rf "${pkgdir}/usr/share/${pkgname}/packages"
# vim:set ts=2 sw=2 et:
enigma-dev-git.install:
# arg 1: the new package version
post_install() {
chmod -R 766 /opt/enigma-dev-git
# arg 1: the old package version
pre_remove() {
chmod -R 744 /opt/enigma-dev-git
vim:set ts=2 sw=2 et:
/usr/bin script:
# excute lateralgm jar file.
cd /opt/enigma-dev-git/ # fix for strange bug, where you have to be in the same directory as lgm16b4.jar.
java -jar lgm16b4.jar
Thanks..
Last edited by gandalf3 (2013-05-28 21:28:23)

Similar Messages

  • Error when installing with pacman

    yesterday i update my arch and now i cant install anything this is the error
    error: giblib: key "7F2D434B9741E8AC" is unknown
    error: error al realizar la transacción (paquete no válido o dañado)
    Ocurrieron errores, no se actualizaron paquetes
    any idea how to fix it =/
    i tried to use yaourt but this hapened :
    sudo yaourt -S scrot
    package-query: error while loading shared libraries: libalpm.so.6: cannot open shared object file: No such file or directory
    package-query: error while loading shared libraries: libalpm.so.6: cannot open shared object file: No such file or directory
    package-query: error while loading shared libraries: libalpm.so.6: cannot open shared object file: No such file or directory
    resolviendo dependencias...
    verificando conflictos...
    Objetivos (2): giblib-1.2.4-5  scrot-0.8-4
    Tamaño instalado:       0,25 MiB
    ¿Continuar con la instalación? [S/n] s
    (2/2) verificando la integridad de los paquetes    [----------------------] 100%
    error: giblib: key "7F2D434B9741E8AC" is unknown
    :: Importar la llave PGP 9741E8AC, "Pierre Schmitz <[email protected]>", creada 2011-04-10? [S/n] s
    error: key "Pierre Schmitz <[email protected]>" could not be imported
    error: error al realizar la transacción (paquete no válido o dañado)
    Ocurrieron errores, no se actualizaron paquetes
    missing dependency for package-query : pacman<3.6

    karol wrote:
    jose.mendez wrote:
    karol wrote:jose.mendez, when using [testing] repo you should be subscribed to arch-dev-public mailing list. As the name implies, this repo is meant for the brave souls who want to test the brand new packages.
    didnt know that(about the public mailing list), still got a lot to learn xD
    just want to fix pacman then upgrade with out [testing] but still dont know how to doit =/
    Try https://bbs.archlinux.org/viewtopic.php … 4#p1003364
    still cant import the keys =/

  • Ive just upgraded my late 2009 macbook, and things are not working properly. First of all, when I started the computer first time after installing Mountain Lion, some message advised me that some files were impossible to install.

    Ive just upgraded my late 2009 macbook, and things are not working properly. First of all, when I started the computer first time after installing Mountain Lion, some message advised me that some files were impossible to install. Once I wrote my password, and for now on, everytime I start the session, another window advise me that "Java SE 6" is missing, due that, the computer can't run some "CS5Service Manager". If I try to install it, the download ends with an error. If finally, you skip the istallation, you arrive to the dock, but the menu bar at the top of the screen doesn't show up.
    In addition, my trackpad doesn't works either. I can move the arrow but i can't click anywhere, probably because the option of clicking by touching is disabeled and I can't performance a regular click.
    I'll be very glad if someone know what the heck is happening with my computer. Anyway, I'm going to the genius bar next Saturday. Thx!

    We're sorry.
    We can't find the article you're looking for.
    Please return to the Apple Support homepage.
    Sigh.

  • I have used lightroom for ~2 years and have lightroom 5.5 installed on a PC. Yesterday evening I uploaded a new set of photos which I cataloged and rated as usual. After that when I switched to the develop module trouble began. First thing was when using

    I have used lightroom for ~2 years and have lightroom 5.5 installed on a PC. Yesterday evening I uploaded a new set of photos which I cataloged and rated as usual. After that when I switched to the develop module trouble began. First thing was when using the crop tool the picture would disappear and only reappear once I closed the tool. Then exposure and White balance changes would change the histogram but not the appearance of the photo. Finally clipping was also not appearing on the picture. I first reuploaded the photos. No effect. Then I reinstalled lightroom. No effect. Help please!

    Try deleting your preferences file
    How do I delete the Lightroom Preferences file? - The Lightroom Queen Help Desk & Members Area - Powered by Kayako Resol…

  • I have just installed iTunes for the first time. When I run the application I get a "iTunes not working" message. Operating system Vista (32 bit). I have tried reinstalling with all firewalls off, but still no success. Have other people had this problem?

    I have just installed iTunes for the first time. When I run the application I get a "iTunes not working" message. Operating system Vista (32 bit). I have tried reinstalling with all firewalls off, but still no success. Have other people had this problem?

    Drrhythm2 wrote:
    What's the best solution for this? I
    Copy the entire /Music/iTunes/ folder from her old compouter to /Music/ in her account on this new computer.

  • When installing a system upgrade, do i need to backup my files, photos, etc. first?

    When installing a system upgrade, do i need to backup my files, photos, etc. first?

    No, you don't need to, but it is highly recommended. Upgrades can fail, the computer may fail, the may be a power outage, etc. Never be without a current backup. Never upgrade until after you make a backup.
    I recommend making a bootable backup by cloning:
    Clone using Restore Option of Disk Utility
      1. Open Disk Utility in the Utilities folder.
      2. Select the destination volume from the left side list.
      3. Click on the Restore tab in the DU main window.
      4. Select the destination volume from the left side list and drag
           it to the Destination entry field.
      5. Select the source volume from the left side list and drag it to
          the Source entry field.
      6. Double-check you got it right, then click on the Restore button.
    Destination means the external backup drive. Source means the internal startup drive.

  • Pacman segfault when installing nvidia

    ok so i have been trying to reinstall arch linux on my comp for the last couple of days.... was testing some other ditros but got bored so time to come back to arch and so i completed an ftp install and issued pacman -Sy and got synched and then when i tried to pacman -S nvidia (i refuse to run xorg without the nvidia driver for my 6800gs card) i got a segmentation fault.  i thought maybe i screwged the install so i went ahead and reinstalled arch.... no luck.  so now pacman refuses to work untill i reboot.... so i do and then i think alright well i'll just pacman -S xorg and deal with nvidia when its fixed but for whatever reason it seems that xorg in extra is broken.... not all the packages downloaded.... and yes i have tried diferent servers.... i have run arch linux with NO problems in the past, what am i doing wrong? is the nvidia package messed up at the moment and should i download the one off the nvidia site or have i not confgured something right? hope you guys can help!
    Grama

    ok but when i ran:
    pacman -S xorg
    some files were missing or unable to download or SOMETHING when i tried to install xorg last night.  and i am pretty sure it completely failed.... problem was i had already taken my sleeping meds and wasn't thinking clearly enough to write down the output before trying a reisntall so ????? i will try again (btw its openbox) and we'll see i guess.
    Grama

  • Update license at first time when installed SAP ECC 5

    Hi Expert
    How to update license at first time when installed SAP ECC 5 Unicode System, license expiration period only one month.
    Regds.
    Rahul

    Hello,
    SAPKIPYJ63 is PI_BASIS 2005_1_640: patch 0003.
    Apparently you have included this support package in the upgrade. But have you installed or upgrade the component PI_BASIS to 2005_1_640 during the IS_SELECT phase? This is required for support package SAPKIPYJ63.
    Regards,
    Joe

  • [SOLVED] pacman hanged when install or remove packages

    when I use pacman -S , it only shows "resolving dependencies...". If I use pacman -R , it hangs at "checking dependencies..."
    I have tried to overwrit the programme with extracted the package manually, it didn't help me.How can I resolve the problem
    Last edited by nyfair (2008-03-25 14:16:21)

    sudo pacman -S pacman --debug
    debug: config: attempting to read file /etc/pacman.conf
    debug: config: new section 'options'
    debug: config: HoldPkg: pacman
    debug: config: HoldPkg: glibc
    debug: config: new section 'testing'
    debug: setlibpaths() called
    debug: option 'cachedir' = /var/cache/pacman/pkg/
    debug: registering sync database 'testing'
    debug: opening database 'testing'
    debug: opening database from path '/var/lib/pacman/sync/testing/'
    debug: config: including /etc/pacman.d/mirrorlist
    debug: config: attempting to read file /etc/pacman.d/mirrorlist
    debug: adding new server to database 'testing': protocol 'ftp', server 'mirror.pacific.net.au', path '/linux/archlinux/testing/os/x86_64'
    debug: config: finished parsing /etc/pacman.d/mirrorlist
    debug: config: new section 'core'
    debug: registering sync database 'core'
    debug: opening database 'core'
    debug: opening database from path '/var/lib/pacman/sync/core/'
    debug: config: including /etc/pacman.d/mirrorlist
    debug: config: attempting to read file /etc/pacman.d/mirrorlist
    debug: adding new server to database 'core': protocol 'ftp', server 'mirror.pacific.net.au', path '/linux/archlinux/core/os/x86_64'
    debug: config: finished parsing /etc/pacman.d/mirrorlist
    debug: config: new section 'extra'
    debug: registering sync database 'extra'
    debug: opening database 'extra'
    debug: opening database from path '/var/lib/pacman/sync/extra/'
    debug: config: including /etc/pacman.d/mirrorlist
    debug: config: attempting to read file /etc/pacman.d/mirrorlist
    debug: adding new server to database 'extra': protocol 'ftp', server 'mirror.pacific.net.au', path '/linux/archlinux/extra/os/x86_64'
    debug: config: finished parsing /etc/pacman.d/mirrorlist
    debug: config: new section 'community'
    debug: registering sync database 'community'
    debug: opening database 'community'
    debug: opening database from path '/var/lib/pacman/sync/community/'
    debug: config: including /etc/pacman.d/mirrorlist
    debug: config: attempting to read file /etc/pacman.d/mirrorlist
    debug: adding new server to database 'community': protocol 'ftp', server 'mirror.pacific.net.au', path '/linux/archlinux/community/os/x86_64'
    debug: config: finished parsing /etc/pacman.d/mirrorlist
    debug: config: finished parsing /etc/pacman.conf
    debug: registering local database
    debug: opening database 'local'
    debug: opening database from path '/var/lib/pacman/local/'
    debug: loading package cache for repository 'testing'
    debug: loading package cache for repository 'core'
    debug: loading package cache for repository 'local'
    warning: pacman-3.1.3-1 is up to date -- reinstalling
    debug: package 'pacman' not found in sync
    debug: adding target 'pacman' to the transaction set
    resolving dependencies...
    debug: resolving target's dependencies
    debug: started resolving dependencies
    debug: checkdeps: package pacman-3.1.3-1
    then the programme hanged
    after I press ctrl+c, it shows
    debug: returning error 29 from alpm_trans_interrupt : operation not compatible with the transaction type
    debug: closing database 'local'
    debug: unregistering database 'local'
    debug: freeing package cache for repository 'local'
    debug: closing database 'testing'
    debug: unregistering database 'testing'
    debug: freeing package cache for repository 'testing'
    debug: closing database 'core'
    debug: unregistering database 'core'
    debug: freeing package cache for repository 'core'
    debug: closing database 'extra'
    debug: unregistering database 'extra'
    debug: closing database 'community'
    debug: unregistering database 'community'

  • First PKGBUILD, comments are welcomed

    Hi,
    I adopted the orphan package Selfoss and modified the PKGBUILD and .install files. Since this is my first one, I thought I post it here first. So if anybody has any input I would really appreciate it.
    The two big differences between my PKGBUILD and the original is that I moved the config file to /etc/selfoss/.. and that I keep the old data folder (on upgrades). I keep the data folder because the selfoss homepage states that you should on upgrades
    Upload all new files and folders excluding the data folder
    My main concern is this folder thing (which I do in the .install file). My suspicion is that I maybe don't need to restore the old data folder. I made some quick tests, and it looked like pacman kept everything that had been added or modified after the last install. But I really don't know when or how pacman will change stuff on a upgrade. So I started looking for answers. First on the wiki, like on pages about ABS, PKGBUILD, creating packages and the Arch packaging standards and then on the forum. But I didn't find it..
    Anyhow, here's my PKGBUILD and .install . Thanks in advance!
    PKGBUILD
    # Maintainer: Maxim Andersson <[email protected]>
    # Contributor: Tetsumaki <http://goo.gl/YMBdA>
    pkgname=selfoss
    pkgver=2.9
    pkgrel=1
    pkgdesc="The new multipurpose rss reader, live stream, mashup, aggregation web application"
    arch=('any')
    url="http://selfoss.aditu.de/"
    license=('GPL3')
    depends=('php>=5.3')
    optdepends=('apache: is depedency if you do not use lighttpd or nginx'
    'lighttpd'
    'nginx'
    'mariadb: is depedency if you do not use postgresql or sqlite'
    'postgresql'
    'sqlite'
    'php-sqlite: is dependacy if you use sqlite'
    'wget: for automatic updating feeds with cron'
    'curl: for automatic updating feeds with cron')
    conflicts=('selfoss-git')
    backup=('etc/webapps/selfoss/config.ini')
    install=${pkgname}.install
    source=("http://selfoss.aditu.de/${pkgname}-${pkgver}.zip"
    "${pkgname}.install")
    sha256sums=('9bf3642c7de146c1a89c336ad5fc77e1823d125d7dbfed9060c6c7c2cdc8ec39'
    'f59a0de2ee13d83a263a8f1a0c25ee3542e1981d6ead19af299999818975e142')
    package() {
    rm -rf README.md ${pkgname}-${pkgver}.zip
    install -d "${pkgdir}"/usr/share/webapps/${pkgname}
    cp -rf . "${pkgdir}"/usr/share/webapps/${pkgname}/
    # move config to etc
    install -d "${pkgdir}"/etc/webapps/${pkgname}
    sed '4,$s/^/;/' "${pkgdir}"/usr/share/webapps/${pkgname}/defaults.ini > "${pkgdir}"/etc/webapps/${pkgname}/config.ini
    chmod 755 "${pkgdir}"/usr/share/webapps/${pkgname}/{data/cache,data/favicons,data/logs,data/sqlite,data/thumbnails,public}
    chown -R http: "${pkgdir}"/usr/share/webapps/${pkgname}
    # vim:set ts=2 sw=2 et:
    selfoss.install
    link_config() {
    ln -sf /etc/webapps/selfoss/config.ini /usr/share/webapps/selfoss/config.ini
    chown http: /usr/share/webapps/selfoss/config.ini
    post_install() {
    link_config
    echo ""
    echo "==> Installed in : /usr/share/webapps/selfoss"
    echo "==> Change RewriteBase in .htaccess"
    echo "==> Check http://selfoss.aditu.de/ for details."
    echo ""
    echo "==> Config is now at /etc/webapps/selfoss/config.ini"
    echo ""
    pre_upgrade() {
    # save old config (from pkgbuild 2.8)
    [[ -f /usr/share/webapps/selfoss/config.ini && ! -f /etc/webapps/selfoss/config.ini ]] \
    && install -Dm644 /usr/share/webapps/selfoss/config.ini /etc/webapps/selfoss/config.ini
    [[ -f /usr/share/webapps/selfoss/config.ini && -f /etc/webapps/selfoss/config.ini ]] \
    && install -Dm644 /usr/share/webapps/selfoss/config.ini /etc/webapps/selfoss/config.ini.backup
    # temporarily backup data folder
    rm -rf /tmp/data
    cp -rf /usr/share/webapps/selfoss/data /tmp/ 2> /dev/null
    post_upgrade() {
    link_config
    # restore data folder
    if [[ -d /tmp/data ]]; then
    rm -rf /usr/share/webapps/selfoss/data
    cp -rf /tmp/data /usr/share/webapps/selfoss/
    fi
    rm -f /usr/share/webapps/selfoss/public/{all.css,all.js}
    [[ -d /usr/share/webapps/selfoss/data/icons ]] \
    && mv -f /usr/share/webapps/selfoss/data/{icons,favicons}
    echo ""
    echo "==> For a clean update:"
    echo "==> Change RewriteBase in .htaccess"
    echo "==> Refresh your browser cache (CTRL+R in most cases)"
    echo "==> Check http://selfoss.aditu.de/ for details."
    echo ""
    echo "==> Config is now at /etc/webapps/selfoss/config.ini"
    echo ""
    For reference, here's the AUR page with the old PKGBUILD.

    Ok, so here's how my PKGBUILD and .install looks like now.
    PKGBUILD
    # Maintainer: Maxim Andersson <[email protected]>
    # Contributor: Tetsumaki <http://goo.gl/YMBdA>
    pkgname=selfoss
    pkgver=2.9
    pkgrel=1
    pkgdesc="The new multipurpose rss reader, live stream, mashup, aggregation web application"
    arch=('any')
    url="http://selfoss.aditu.de/"
    license=('GPL3')
    depends=('php>=5.3')
    optdepends=('apache: server, depedency if not using lighttpd or nginx'
    'lighttpd: server, depedency if not using apache or nginx'
    'nginx: server, depedency if not using lighttpd or apache'
    'mariadb: database, depedency if not using postgresql or sqlite'
    'postgresql: database, depedency if not using mariadb or sqlite'
    'sqlite: database, depedency if not using postgresql or mariadb'
    'php-sqlite: dependency if using sqlite'
    'wget: for automatic updating feeds with cron'
    'curl: for automatic updating feeds with cron')
    backup=('etc/webapps/selfoss/config.ini')
    install=${pkgname}.install
    source=("http://selfoss.aditu.de/${pkgname}-${pkgver}.zip")
    sha256sums=('9bf3642c7de146c1a89c336ad5fc77e1823d125d7dbfed9060c6c7c2cdc8ec39')
    package() {
    rm -rf "${srcdir}"/{README.md,${pkgname}-${pkgver}.zip}
    install -d "${pkgdir}"/usr/share/webapps/${pkgname}
    cp -af "${srcdir}"/. "${pkgdir}"/usr/share/webapps/${pkgname}/
    # create config in /etc
    install -d "${pkgdir}"/etc/webapps/${pkgname}
    sed '4,$s/^/;/' "${pkgdir}"/usr/share/webapps/${pkgname}/defaults.ini > "${pkgdir}"/etc/webapps/${pkgname}/config.ini
    ln -sf /etc/webapps/${pkgname}/config.ini "${pkgdir}"/usr/share/webapps/${pkgname}/config.ini
    chmod 755 "${pkgdir}"/usr/share/webapps/${pkgname}/{data/cache,data/favicons,data/logs,data/sqlite,data/thumbnails,public}
    chown -R http: "${pkgdir}"/usr/share/webapps/${pkgname}
    # vim:set ts=2 sw=2 et:
    .install
    post_install() {
    echo ""
    echo "==> Installed in : /usr/share/webapps/selfoss"
    echo "==> Change RewriteBase in .htaccess"
    echo "==> Check http://selfoss.aditu.de/ for details."
    echo ""
    echo "==> Config is now at /etc/webapps/selfoss/config.ini"
    echo ""
    pre_upgrade() {
    # save old untracked config (from pkgbuild 2.8) and make it tracked
    [[ -f /usr/share/webapps/selfoss/config.ini && ! -h /usr/share/webapps/selfoss/config.ini ]] \
    && install -Dm644 /usr/share/webapps/selfoss/config.ini /etc/webapps/selfoss/config.ini
    post_upgrade() {
    rm -f /usr/share/webapps/selfoss/public/{all.css,all.js}
    echo ""
    echo "==> For a clean update:"
    echo "==> Change RewriteBase in .htaccess"
    echo "==> Refresh your browser cache (CTRL+R in most cases)"
    echo "==> Check http://selfoss.aditu.de/ for details."
    echo ""
    echo "==> Config is now at /etc/webapps/selfoss/config.ini"
    echo ""
    pre_remove() {
    # remove untracked files
    find /usr/share/webapps/selfoss/data/ -type f -exec rm -f '{}' ';' 2> /dev/null
    rm -f /usr/share/webapps/selfoss/public/{all.css,all.js}
    Thanks for all the time you spent explainting stuff! Really appreciate it. Can't wait to adopt a new PKGBUILD or maybe make a new one
    The only thing I wasn't able to do was to put the data directory in /var/lib/. On upgrades pacman complained about the new link (ln -s /var/lib/.. data), because it was already tracking a directory with the same name ('data'). But that's no big deal.
    Last edited by thesilentboatman (2014-02-10 17:13:22)

  • Made my first PKGBUILD... :)

    Hi Forum,
    I have made my first PKGBUILD, it is a hack of the PKGBUILD of BRLCAD, which I have used to pack Ofeli, http://www.ofeli.net/, to /usr{bin lib share doc} as required by Archer Philosophy.
    Here it is :
    # Maintainer: Loui Chang <louipc dot ist at gmail company>
    pkgname=ofeli
    pkgver=2.0.2
    pkgrel=1
    pkgdesc="Finite elements analysis Package"
    url="http://brlcad.org"
    license=('LGPL' 'BSD' 'custom:BDL')
    #install=brlcad.install
    arch=('i686' 'x86_64')
    #makedepends=('bc' 'libxslt')
    #depends=('boost' 'flex' 'libpng' 'zlib' 'libgl' 'tk>=8.5')
    #options=('!libtool')
    source=(ofeli-2.0.2.tar.gz)
    build() {
    cd $srcdir/$pkgname-$pkgver
    ./configure --prefix=/usr
    # --with-opengl=/usr/lib \
    # --with-tcl=/usr/lib \
    # --disable-step \
    # --disable-tkhtml3 \
    # --disable-tkimg \
    # --disable-opennurbs
    # For opennurbs, etc
    # gcc -I/opt/brlcad/include -L/opt/brlcad/lib
    make || return 1
    package() {
    cd $srcdir/$pkgname-$pkgver
    make DESTDIR=$pkgdir install || return 1
    # install -D -m755 $srcdir/brlcad.sh $pkgdir/etc/profile.d/brlcad.sh
    # mkdir -p $pkgdir/usr/share/licenses/$pkgname
    # cp $srcdir/$pkgname-$pkgver/doc/legal/bdl.txt \
    # $pkgdir/usr/share/licenses/$pkgname
    # cp $srcdir/$pkgname-$pkgver/doc/legal/bsd.txt \
    # $pkgdir/usr/share/licenses/$pkgname
    #md5sums=('8ccbc692d84854c9b0599b6d1255f916'
    # '4922e66ff0835169374b9c0569c2f569')
    As you all can see, I hacked parts of this script so as to run a simple ./configure make make install in $PKG/usr fakeroor, and pack it into an Arch package.
    I have lots of questions, one at a time...
    1.) How do I know that something wont be over written as soon as I run pacman -U my-pkg.tar.xz  ?
    2.) Since Directory structure of Ofeli respects Linux file structure, I decided to drop it in /usr... If it did not, I would probably ship it to /opt, but why /usr instead of /usr/local....?
    3.) I tried to make a similar hack with mbdyn,  http://www.aero.polimi.it/mbdyn/, but I failed. Standard autoconf install of mbdyn complies with ./configure make make install scheme, and it creates /usr/local/{bin lib libexec share }
    When I ran this PKGBUILD
    #  Maintainer: Loui Chang <louipc dot ist at gmail company>
    pkgname=mbdyn
    pkgver=1.3.15
    pkgrel=1
    pkgdesc="A MultiBody Dynamics analysis package"
    url="http://brlcad.org"
    license=('LGPL' 'BSD' 'custom:BDL')
    #install=brlcad.install
    arch=('i686' 'x86_64')
    #makedepends=('bc' 'libxslt')
    #depends=('boost' 'flex' 'libpng' 'zlib' 'libgl' 'tk>=8.5')
    #options=('!libtool')
    source=(mbdyn-1.3.15.tar.gz)
    build() {
        cd $srcdir/$pkgname-$pkgver
        ./configure --prefix=/usr
    #    --with-opengl=/usr/lib \
    #    --with-tcl=/usr/lib \
    #    --disable-step \
    #    --disable-tkhtml3 \
    #    --disable-tkimg \
    #    --disable-opennurbs
    # For opennurbs, etc
    # gcc -I/opt/brlcad/include -L/opt/brlcad/lib
        make || return 1
    package() {
        cd $srcdir/$pkgname-$pkgver
        make DESTDIR=$pkgdir install || return 1
    #    install -D -m755 $srcdir/brlcad.sh $pkgdir/etc/profile.d/brlcad.sh
    #    mkdir -p $pkgdir/usr/share/licenses/$pkgname
    #    cp $srcdir/$pkgname-$pkgver/doc/legal/bdl.txt \
    #        $pkgdir/usr/share/licenses/$pkgname
    #    cp $srcdir/$pkgname-$pkgver/doc/legal/bsd.txt \
    #        $pkgdir/usr/share/licenses/$pkgname
    #md5sums=('8ccbc692d84854c9b0599b6d1255f916'
    #         '4922e66ff0835169374b9c0569c2f569')
    ( Similar hack of BRLCAD PKGBUILD )  it failed when trying to create libexec...   how can I change this....?
    4.) suppose I want to untar a package.zip in /opt/package, and make a script in /usr/bin/ called "package" containing 'cd /opt/package&&./initscript.sh' properly chmoded as executable, How do I build a PKGBUILD to build a package which once installed will perform this...?
    Most of these questions can seem n00bish, but i am not a great Archer yet...  just a little Archer trying to learn something.... 

    1) pacman will yell at you if there are file conflicts. Generally, if you're packaging something that already exists, you should tack on a suffix (e.g. -git or -nox) to describe the difference. The "official" package then makes it into the conflicts array of your modified package.
    2) /usr/local is generally reserved for things that won't fall under the domain of the package manager. See the FHS for more details.
    3) libexec is avoided in Arch because it does not adhere to the FHS (see above link). The files that go to /usr/libexec should probably end up in /usr/lib instead. Look at the help provided by the config script (./configure --help).
    4) You don't need an install scriptlet to chmod files. Set the permission bits in the package() function after they're moved into place.

  • First PKGBUILD (anki-git), review welcome

    According to a discussion at https://anki.tenderapp.com/discussions/ … arch-linux , a bug in Qt appears to have broken some functionality in Anki. There is a workaround in the git repo, but until the next stable version is released, the sidebar in the deck browser will not work.
    Because I use Anki heavily, and because I also like my Arch install up-to-date, I endeavored to write my first PKGBUILD. It is basically a combination of the current one for anki and an ankiqt-git package from last year, before Anki had a major overhaul.
    Since this is my first PKGBUILD, I would very much welcome some opinions before submitting it to the AUR. The install file is simply the same as the one for anki, but I have nonetheless included it for completeness.
    PKGBUILD: http://pastebin.com/4x16AN3B (updated 19:14 GMT)
    install file: http://pastebin.com/NEZsA4KB
    Last edited by tobi-fankhaenel (2013-04-02 19:15:23)

    Comments and alterations, untested, just a quick reply.
    pkgname=anki-git
    pkgver=20130402
    pkgver() { # Include a pkgver() function to provide more useful information
    cd "$pkgname"
    git describe | sed 's/-/./g' # Alter where appropriate
    } # pkgver= above will be automatically updated based on the result of this function
    pkgrel=1
    pkgdesc="Helps you remember facts efficiently. Git Version."
    url="https://github.com/dae/anki"
    license=('GPL')
    arch=('any')
    depends=('python2-pyqt' 'python2-sqlalchemy' 'python2-simplejson'
    'python2-pysqlite' 'python2-beautifulsoup3')
    makedepends=('git')
    optdepends=('python2-matplotlib: show graphs'
    'sox: audio recording'
    'portaudio') # Why is the an optdep? "portaudio: <reason>" (even if it's obvious)
    provides=('anki')
    conflicts=('anki' 'ankiqt-git')
    install=anki-git.install
    # pacman 4.1
    source=("$pkgname"::git+git://github.com/dae/anki.git) # I like using $pkgname:: for consistency across PKGBUILDs
    md5sums=('SKIP')
    build() {
    cd "$srcdir/$pkgname"
    sed -i 's|pyuic4 $i -o $py|python2-pyuic4 $i -o $py|' tools/build_ui.sh
    ./tools/build_ui.sh
    sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' runanki
    rm -f anki.bat
    package() {
    cd "$srcdir/$pkgname"
    # All of this is horrible practice
    # Instead of using cp or mv, use `install' with the appropriate permissions E.g. `install -Dm644 target "$pkgdir"/.../target'
    # if you have to use `cp' use `cp -dp --no-preserve=ownership --target-directory="$pkgdir"/...
    Last edited by Earnestly (2013-04-20 11:46:40)

  • Celtx - Need guidance with first PKGBUILD

    Ok, I decided to make my first PKGBUILD, and chose Celtx (http://celtx.com/) since it seems like a very useful tool, and not too complicated. 
    I already installed it manually and it works fine. However, although they state it's open source, the sources aren't available on their website...only language-specific compiled packages. Can I make a package for the AUR without sources?
    Anyway, these are the installation steps I had in mind: extract tar.gz to the /opt directory --> create a symlink for /opt/celtx/celtx in /usr/bin --> copy the license to its appropriate folder (/usr/share/licenses/celtx).
    I think that's it. Am I missing something or trying to do something I shouldn't? It seems simple enough and I'm working on the PKGBUILD, but I would still like to know if I should even finish it based on my first question concerning the lack or sources.

    Oh well, I finished before getting a response. Doesn't matter...I'm just glad I did something, regardless of how inconsequential. 
    If anyone wants to take a look at it below, and point out any mistakes, I would be grateful. By the way, it does work. I built the package and installed it with pacman, and everything is where it should be, and it runs. 8)
    pkgname=celtx
    pkgver=0.9.8
    pkgrel=1
    pkgdesc="Pre-production software for film, video, theatre, and animation"
    url="http://celtx.com/"
    license="custom:CePL"
    arch=(i686)
    source=(http://www.celtx.com/download/Celtx.tar.gz)
    md5sums=('f59759e16b3d64e3592aaf37641ee5b8')
    build() {
    mkdir -p $startdir/pkg/opt/
    cp -R $startdir/src/$pkgname $startdir/pkg/opt/$pkgname/
    mkdir -p $startdir/pkg/usr/bin/
    ln -sf $startdir/pkg/opt/$pkgname/$pkgname $startdir/pkg/usr/bin/$pkgname
    mkdir -p $startdir/pkg/usr/share/licenses/custom/$pkgname
    cp $startdir/license.txt $startdir/pkg/usr/share/licenses/custom/$pkgname/

  • My first PKGBUILD - Accentuate 1.0

    Hi everyone, I started to practice some ABS, and i created a simple PKGBUILD to install accentuate (it's a fork of KeyJnote, now unreachable for legal issues), a software to present pdf or png slideshows with interesting (and sometimes hidden) features.
    Because it is the first PKGBUILD I'm going to release in the AUR, It would be great if someone gave me a little review of what I've done.
    Here it is:
    # Contributor: Asa Marco <marcoasa90 <at> gmail.com>
    pkgname="accentuate-git"
    pkgver=20081023
    pkgrel=1
    license="GPL"
    arch=('i686' 'x86_64')
    pkgdesc="Presentation tool based on KeyJNote, with many eyecandy effects"
    depends=('python' 'python-opengl' 'python-pygame' 'pil' 'poppler')
    makedepends=('git')
    optdepends=('mplayer: needed to play audio and videos')
    source=()
    url="http://www.cs.rit.edu/~jrm8005/accentuate.html"
    md5sums=()
    _gitroot="git://repo.or.cz/accentuate.git"
    _gitname="accentuate"
    build() {
    git clone $_gitroot
    cd $startdir/src/$_gitname
    install -D -m755 accentuate ${startdir}/pkg/usr/bin/accentuate
    Another way to make it works, could look like this:
    source=('http://repo.or.cz/w/accentuate.git?a=snapshot;h=heads/master;sf=tgz')
    url="http://www.cs.rit.edu/~jrm8005/accentuate.html"
    md5sums=()
    _gitname="accentuate"
    build() {
    cd $startdir/src/$_gitname
    install -D -m755 accentuate ${startdir}/pkg/usr/bin/accentuate
    Considering that the second option doesn't need any makedepends, what's the best approach?
    Any suggestion is wellcome!

    I like the first way best and having git as an extra dependency isn't really an issue.
    Now, the PKGBUILD looks great (considering it's your first), although there is room for improvement. For starters, you can base your package on /usr/share/pacman/PKGBUILD-git.proto (here's a newer version), which is a nice template for git packages. Doing so will help create a more sophisticated package whilst preventing order inconsistencies. Another thing you might want to do is to remove empty fields from the PKGBUILD (i.e.: source, md5sums, etc), purely for aesthetic reasons. Lastly and more importantly, the license field must be an array instead of a string.
    All three of the above are minor issues and shouldn't put you off.
    Edit: You may as well leave python out of the dependencies list, as it's implicitly required by the rest of the python packages.
    Last edited by foutrelis (2008-10-24 01:53:06)

  • Help with my first PKGBUILD script [solved]

    Hi There
    I am trying to write my first PKGBUILD script and I am landing in a bit of trouble.  The script is short and is:
    #Contributor: iKevin <kellwood-at-ameritech.net>
    pkgname=fpm
    pkgver=0.60
    pkgrel=1
    pkgdesc="A password manager for gnome"
    url="http://fpm.sourceforge.net"
    license="GPL"
    depends=('xorg' 'gtk' 'glibc' 'libgnome' 'libxml2' 'glib')
    source=(http://heanet.dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
    md5sums=(be7655d300c306c8f962f6aad0a60cc5)
    build() {
    cd $startdir/src/$pkgname-$pkgver
    ./configure --prefix=/usr
    make || return 1
    mkdir -p $startdir/pkg/usr/bin
    make prefix=$startdir/pkg/usr install
    I haven't reach the point where it compiles.  It failes to download the file.  Oddly, when I type:
    wget http://heanet.dl.sourceforge.net/source … .60.tar.gz
    it downloads fine.  When running makepkg, the contents of ./src/fpm-0.60.tar.gz is some kind of web page.
    I have eyeballed this PKGBUILD script for a while and I can't see any problems.  Is there something special about sourceforge files?  I feel that I must have a typo because makepkg is using wget, which works by hand.
    Thanks
    Kev

    Well,
    I installed kedpm with my first working PKGBUILD script.  I was able to import my "fpm" password file.  Once I get my gnucash stuff transfered into grisbi, I will be able to switch my main machine completely to archlinux.
    I know it is trivial for you guys, but here is my script -- it might save you some typing.
    Kev
    pkgname=kedpm
    pkgver=0.4.0
    pkgrel=1
    pkgdesc="Ked Password Manager helps to manage large amounts of passwords and related information"
    url="http://kedpm.sourceforge.net/"
    depends=(python pygtk pycrypto)
    makedepends=()
    conflicts=()
    replaces=()
    backup=()
    install=
    source=(http://dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
    md5sums=('6b83a646873f8ea00af9c6403aa259bc')
    build() {
    cd $startdir
    mkdir -p pkg/usr
    cd $startdir/src/$pkgname-$pkgver
    python setup.py install --prefix=$startdir/pkg/usr

Maybe you are looking for

  • Problem sorting by Artist in grid view using Itunes 8

    I have a lot of albums that contain various artist and i set up the info in each with the correct artist name and "various artist" as the album artist. In itunes 8 when i use grid view and use show by artist it displays by album artist putting all th

  • Best practice for SSH access by a user across multiple Xserves?

    Hello. I have 3 Xserves and a Mac Mini server I'm working with and I need SSH access to all these machines. I have given myself access via SSH in Server Admin access settings and since all 4 servers are connected to an OD Master (one of the three Xse

  • MESSAGE_TYPE_X in Tcode VT01N

    Hi, I have a system dump error in Tcode VT01N. There is a form named as XVTTK_READ in program FV56HF0X. FORM XVTTK_READ USING TKNUM LIKE VTTK-TKNUM.   PERFORM XVTTK_EXIST USING TKNUM.   IF sy-subrc NE 0.     MESSAGE X002 WITH 'READ TABLE' 'XVTTK' VTT

  • HT4623 Software update is not under my general how can I update?

    I'm trying to install apps on my phone but my iPod needs te IOS 5 update and I go under General but SOFTWARE UPDATE is not on there?? How can I get it so I can download apps.

  • How to know when FTP of incoming file is complete

    Dear all, i would like to know when the FTP is complete on my server of an incoming file from another machine. and as soon as the FTP is complete i want to start the SQLLDR for that file automatically. i am using Redhat linux enterprise linux server