You are not logged in.

#1 2013-07-09 00:07:25

evilzer
Member
Registered: 2012-11-08
Posts: 6

Makedepends check for one and dissregard the other?

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

#2 2013-07-09 02:01:35

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: Makedepends check for one and dissregard the other?

Perhaps it is better to create two PKGBUILDs, one for each make dependency?

Last edited by ackalker (2013-07-09 02:18:57)

Offline

#3 2013-07-09 02:15:55

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Makedepends check for one and dissregard the other?

This is why package providers exist... But I can't give any better advice without seeing the PKGBUILD, or understanding what the possible depends are...

Offline

#4 2013-07-09 04:04:26

evilzer
Member
Registered: 2012-11-08
Posts: 6

Re: Makedepends check for one and dissregard the other?

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. big_smile

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

Board footer

Powered by FluxBB