summaryrefslogtreecommitdiffstats
path: root/extra/ntp/Pkgfile
blob: 76140b0468ba0c4c0da7e2c0ca24b5d90a2c69d2 (plain)
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
# Description: Serveur de synchronisation pour l'horloge système
# URL: http://www.ntp.org/ 
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on: openssl, libcap

name=ntp
version=4.2.4p7
release=1
source=( http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/$name-4.2/$name-$version.tar.gz\
	ntp-4.2.4_p7-nano.patch)


build() {
	source /etc/blfs-bootscripts
        wget http://www.linuxfromscratch.org/blfs/downloads/svn/$scripts-$scriptsversion.tar.bz2
        tar xvf $scripts-$scriptsversion.tar.bz2
	cd $name-$version
	patch -Np1 -i ../ntp-4.2.4_p7-nano.patch
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--with-binsubdir=sbin \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
                --disable-debug
	make
	make DESTDIR=$PKG install
	mkdir -p $PKG/etc
cat > $PKG/etc/ntp.conf << "EOF"

# Europe
server 0.fr.pool.ntp.org
server 1.fr.pool.ntp.org
server 2.fr.pool.ntp.org
server 3.fr.pool.ntp.org
server 0.europe.pool.ntp.org


# Africa
server tock.nml.csir.co.za

# Asia
server 0.asia.pool.ntp.org

# Australia
server 0.oceania.pool.ntp.org

# North America
server 0.north-america.pool.ntp.org

# South America
server 2.south-america.pool.ntp.org

driftfile /var/cache/ntp.drift
EOF
	cd ../$scripts-$scriptsversion
	make DESTDIR=$PKG install-$name
}