You are not logged in.
So I tried to create my first PKGBUILD but got some questions that i couldn't find an answer to on the wiki.
In makedepends I have an option to use either 1 of 2 packages.
Both work to build the package but only one is necessary, so is it possible to check if one of these is
installed and then skip the other or is there another way to do this?
Offline
Perhaps it is better to create two PKGBUILDs, one for each make dependency?
Last edited by ackalker (2013-07-09 02:18:57)
Offline
Offline
Well after looking into it some more it seems one is marginally better then the other.
The two packages are gnome-common and xfce4-dev-tools.
But xfce4-dev-tools have many dependencies while gnome-common only have bash.
So I guess that one must be preferred, at least as default setting?
I chose xfce4-dev-tools since generally xfce4 is more lightweight than gnome.
Guess I should stop thinking like that and check the dependencies first.
Anyway this is the code i decided to go with:
pkgname=light-locker
pkgver=0.1.0
pkgrel=1
pkgdesc="Simple locker forked from gnome-screensaver"
arch=('i686' 'x86_64')
url="https://github.com/the-cavalry/light-locker"
license=('GPL')
depends=('lightdm>=1.7.0' 'dbus-glib' 'gtk3')
makedepends=('intltool' 'gnome-common') # 'xfce4-dev-tools')
source=("https://github.com/the-cavalry/$pkgname/archive/v$pkgver.tar.gz")
md5sums=('4d9660526e56a15302e7668982b2fd60')
build() {
cd "$srcdir/$pkgname-$pkgver"
./autogen.sh --prefix=/usr
make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Offline