aboutsummaryrefslogtreecommitdiffstats
path: root/use/PKGBUILD
blob: b49c17731367c33085deefcb69125d134525e3be (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
# Maintainer: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org>

pkgname=use
pkgver=1.11.7
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=("use-${pkgver}.tar.gz::https://downloads.sourceforge.net/project/use/Version%20${pkgver}/use.d.tar.gz")
sha256sums=('7099e75c17932ff854528b8a17c9f62a0fd2619219693fd8e88dfe95a2605161')


build() {
    cd "$srcdir/use.d"
    ./configure.pl <<EOF
/etc
/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"
}