# Tanım: Inetd'nin güvenli sürümü
# URL: http://www.xinetd.org/
# Paketçi: milisarge
# Gerekler: libtirpc 
# Grup: sistem

isim=xinetd
surum=2.3.15
devir=1
kaynak=(https://sources.archlinux.org/other/packages/xinetd/xinetd-2.3.15.tar.gz
		xinetd.conf
		servers
		services
		fix-CVE-2013-4342.patch)

derle() {
	cd $SRC/$isim-$surum
	sed -i "s#${prefix}/man#${prefix}/share/man#" configure
	# fix #37310
	# https://bugzilla.redhat.com/show_bug.cgi?id=1006100#c
	patch -Np1 -i $SRC/fix-CVE-2013-4342.patch
	./configure --prefix=/usr --sbindir=/usr/bin --without-libwrap
	CFLAGS+=' -I/usr/include/tirpc' LDFLAGS+=' -ltirpc' make
	make prefix=$PKG/usr DAEMONDIR=$PKG/usr/bin install
	install -Dm644 $SRC/xinetd.conf $PKG/etc/xinetd.conf
	install -Dm644 $SRC/servers $PKG/etc/xinetd.d/servers
	install -Dm644 $SRC/services $PKG/etc/xinetd.d/services
	install -Dm644 COPYRIGHT $PKG/usr/share/licenses/$isim/COPYRIGHT
	cd /sources/milis.git/ayarlar/servisler
	make DESTDIR=$PKG kur-xinetd   
	rm -rf $PKG/etc/sysconfig
}
