Since I’m writing some extensions to Avogadro, I find useful having a PKGBUILD for creating a package on Arch Linux.

Here it is

pkgname=avogadro-devel
pkgver=$(git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
pkgrel=1
arch=('i686' 'x86_64')
source=()

prepare() {
  cd "${startdir}"  
  rm -fr pkgbuild
  mkdir -p pkgbuild
}

build() {
    cd "${startdir}/pkgbuild"

  cmake .. \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr 
  make
}

package() {
    cd "${startdir}/pkgbuild"
    make DESTDIR="${pkgdir}" install
}

I have the project folder in ~/progetti/avogadro; just cd there and run makepkg -s as usual.


Comments

comments powered by Disqus