-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD.in
59 lines (52 loc) · 1.4 KB
/
PKGBUILD.in
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Maintainer: @email@
pkgname=mpdev
pkgver=@version@
pkgrel=@release@
pkgdesc="MPD Event Watcher"
arch=('i686' 'x86_64')
url="https://github.com/mbhangui/${pkgname}"
license=('GPL3')
groups=('base-devel')
depends=('coreutils' 'findutils' 'sed' 'sqlite' 'libqmail')
source=("$pkgname-${pkgver}.tar.gz")
sha256sums=('SKIP')
provides=("pkgname")
options=('strip' '!libtool' 'docs' 'staticlibs' 'zipman' 'debug')
backup=(etc/${pkgname}/${pkgname}-release)
install=archpkg.install
changelog=$pkgname.changes
_prefix=@prefix@
_shareddir=@prefix@/share
build() {
cd $srcdir/$pkgname-${pkgver}
./configure --prefix=${_prefix} --sysconfdir=/etc/${pkgname} \
--libexecdir=${_prefix}/libexec/${pkgname}
make -s
}
package() {
depends=('shadow' 'daemontools' 'mpd')
cd $srcdir/$pkgname-${pkgver}
make DESTDIR=${pkgdir} install
install -D -m 0644 ${pkgname}.changes "$pkgdir"${_shareddir}/doc/${pkgname}/${pkgname}.changes
cd $srcdir
}
#### INSTALL SCRIPTS ####
_prefix=@prefix@
_logdir=/var/log/svc
post_install() {
/usr/libexec/${pkgname}/create_service --servicedir=/service --user=1000 --add-service
}
pre_upgrade() {
svc -d /service/${pkgname}
}
post_upgrade() {
svc -d /service/${pkgname}
}
pre_remove() {
svc -d /service/${pkgname}
/usr/libexec/${pkgname}/create_service --servicedir=/service --del-service
}
post_remove() {
log_dir=${_logdir}/${pkgname}
[ "$log_dir" != "/" ] && %{__rm} -fr $log_dir
}