aboutsummaryrefslogblamecommitdiffstats
path: root/main/openntpd/APKBUILD
blob: 753a1f84c73757ae47bb6f62b26a59ccf0f6f817 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                   


                
        

                                                    
                            

                          
        
                         
          
           


                                                                          

                      

         
           
                                     



                                                                     
         
                                     



                                         


                        
           

                                      

                                                                  

 

                                                                                
                                                
                                                 
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openntpd
pkgver=3.9_p1
_myver=3.9p1
pkgrel=8
pkgdesc="Lightweight NTP server ported from OpenBSD"
url=http://www.openntpd.org/
install=openntpd.pre-install

subpackages="openntpd-doc"
depends=
makedepends="openssl-dev"
arch="all"
license=BSD
source="
	ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/openntpd-$_myver.tar.gz
	openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff
	openntpd.confd
	openntpd.initd
	"

prepare() {
	cd "$srcdir/$pkgname-$_myver"
	patch -p1 < ../openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff
	sed -i '/NTPD_USER/s:_ntp:ntp:' ntpd.h || return 1
}

build() {
	cd "$srcdir/$pkgname-$_myver"
	./configure --prefix=/usr \
		--mandir=/usr/share/man \
		--sysconfdir=/etc \
		|| return 1
	make || return 1
}

package() {
	cd "$srcdir/$pkgname-$_myver"
	make install DESTDIR="$pkgdir"
	install -Dm755 ../openntpd.initd "$pkgdir/etc/init.d/ntpd"
	install -Dm644 ../openntpd.confd "$pkgdir/etc/conf.d/ntpd"
}

md5sums="afc34175f38d08867c1403d9008600b3  openntpd-3.9p1.tar.gz
ae2f708b860975b64126bb316aeb6641  openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff
e3eee9eb2ea092dfdf9d887cd6df5795  openntpd.confd
57a508a730359d526d3eb5afb525c0c3  openntpd.initd"