mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 07:07:12 +08:00
45 lines
1.3 KiB
Bash
45 lines
1.3 KiB
Bash
pkgname=openslp
|
|
pkgver=2.0.0
|
|
pkgrel=3
|
|
pkgdesc="Open-source implementation of Service Location Protocol"
|
|
arch=('x86_64')
|
|
url="http://www.openslp.org"
|
|
license=('BSD')
|
|
depends=('glibc' 'bash' 'openssl')
|
|
backup=('etc/slp.conf' 'etc/slp.reg' 'etc/slp.spi')
|
|
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
|
|
"makefile.patch"
|
|
'openslp.service'
|
|
'openslp-2.0.0-null-pointer-deref.patch')
|
|
md5sums=('18cf7940bcc444e32592cf34e84f833f'
|
|
'de1c503d82b30269edc75be614ac0fe9'
|
|
'296dc3c8f75e7a1823fcb9dd97ea0971'
|
|
'af9f6b5fcc7dbe24888b9bba61154533')
|
|
|
|
prepare() {
|
|
# fix package bug, tries to create director /usr/var/log
|
|
patch -Np1 -i makefile.patch
|
|
#fix CVE-2016-4912, thanks to Arch for the patch
|
|
patch -Np1 -i openslp-2.0.0-null-pointer-deref.patch
|
|
}
|
|
|
|
build() {
|
|
cd $pkgname-$pkgver
|
|
|
|
./configure --prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--localstatedir=/var \
|
|
--disable-static \
|
|
--enable-slpv1 \
|
|
--enable-slpv2-security
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname-$pkgver
|
|
|
|
make DESTDIR=$pkgdir DOC_DIR=/usr/share/doc/openslp-$pkgver install
|
|
install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
|
install -D -m644 ../openslp.service $pkgdir/usr/lib/systemd/system/openslp.service
|
|
}
|