aboutsummaryrefslogtreecommitdiffstats
path: root/use/PKGBUILD
blob: 870facd1442d9e350c2ab9121f1ff03f836a41a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org>

pkgname=use
pkgver=1.11.3
pkgrel=1
pkgdesc='A utility to help casual user install multiple versions of a software package'
url='http://use.sourceforge.net/'
arch=('i686' 'x86_64')
license=('custom:3-clause BSD')
depends=('glibc')
makedepends=('gcc' 'glibc' 'make' 'coreutils' 'perl' 'sed')
source=("https://downloads.sourceforge.net/project/use/Version%20${pkgver}/use.d.tar.gz")
sha256sums=('aa810494a3b0cb61dc0f6bbeac8d9b68a5c4c01fc06e0d52f5dbe9cce76b4a8d')


build() {
    cd "$srcdir/use.d"
    ./configure.pl <<EOF
/etc
/tmp
/usr/bin
/usr/share/man/man1
EOF
    sed -i 's:\${INSTALL_:-- "\${DESTDIR}"&:g' Makefile.mk
    make
    sed -i 's:/usr/local/:/usr/:g' use.1 use.*sh
    sed -i 's:/usr/share/use.table:/etc/use.table:g' use.1
}

package () {
    cd "$srcdir/use.d"
    mkdir -p "$pkgdir/etc"
    mkdir -p "$pkgdir/usr/bin"
    mkdir -p "$pkgdir/usr/share/man/man1"
    make install DESTDIR="$pkgdir"
}