🔒 Repository is read-only – file editing is disabled.

recipes/utils/ntp/PAGBUILD.yaml main

34 linii Raw ← Powrót
12345678910111213141516171819202122232425262728293031323334
pkgname: ntp
pkgver: '4.2.8p18'
pkgrel: '6'
pkgdesc: Client and server to keep the time synchronized between various computers over a network.
url: 'https://www.ntp.org/'
arch: x86_64
depends:
- wget
- shadow
makedepends:
- autoconf
- m4
- libtool
- libcap
- perl-io-socket-ssl
- perl-net-ssleay
source:
- 'https://repo.paganlinux.eu/sources/pagan-scripts-20260822.tar.gz'
- 'https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/${pkgname}-4.2/${pkgname}-${pkgver}.tar.gz'
- ntp-fix-build.patch
- ntp-4.2.8p18-openssl_4-1.patch
sha256sums:
- 32e0aec88cc56a8afe0b2671debe47d19357792a6ffaffaf6e3db8a021a57072
- SKIP
- SKIP
- SKIP
hooks:
  pre-install: "name=ntp\nversion=4.2.8p18\nrelease=6\nSN=\"ntp\"\nIDN=\"87\"\nINFO=\"\\033[1;36m\"\nNORMAL=\"\\033[0;39m\"\
    \nif ! (getent group $SN > /dev/null); then\n\tprintf \"${INFO}Creating $SN group${NORMAL}\\n\"\n\tgroupadd -g $IDN $SN\n\
    fi\nif ! (getent passwd $SN > /dev/null); then\n\tprintf \"${INFO}Creating $SN user${NORMAL}\\n\"\n\tuseradd  -c \"Network\
    \ Time Protocol\" -d /var/lib/ntp \\\n\t-g $SN -s /usr/bin/false -u $IDN $SN\nfi\n"
build: "cd ${pkgname}-${pkgver}\n\npatch -Np1 -i ../ntp-fix-build.patch\n\nsed -i 's/getclock/getclock memchr/' sntp/m4/ntp_libntp.m4\nsed -i 's/pthread_detach(NULL)/pthread_detach(0)/' \\\nsntp/m4/openldap-thread-check.m4\npatch -Np1 -i ../ntp-4.2.8p18-openssl_4-1.patch\nautoreconf -fiv\n\nsed -i \"/ep.*FAILED/,+4s/ep/ep2/\" ntpd/ntp_io.c\n\nsed -e 's/\"(\\\\S+)\"/\"?([^\\\\s\"]+)\"?/' \\\n    -i scripts/update-leap/update-leap.in\n\nUN=ntp\nif ! (getent group $UN > /dev/null); then\n   groupadd -g 87 $UN\nfi\nif ! (getent passwd $UN > /dev/null); then\n   useradd  -c \"Network Time Protocol\" -d /var/lib/ntp \\\n   -g $UN -s /usr/bin/false -u 87 $UN\nfi\n\n./configure --prefix=/usr \\\n--sbindir=/usr/bin \\\n--sysconfdir=/etc \\\n--mandir=/usr/share/man \\\n--infodir=/usr/share/info \\\n--enable-linuxcaps \\\n--with-lineeditlibs=readline \\\n--docdir=/usr/share/doc/${pkgname}\n\nmake \nmake DESTDIR=${PKGDIR} install\nmkdir -p ${PKGDIR}/var/lib/ntp\ninstall -v -o ntp -g ntp -d ${PKGDIR}/var/lib/ntp\nmkdir -p ${PKGDIR}/etc\n\ncat > ${PKGDIR}/etc/ntp.conf << \"EOF\"\n\n# Europe\nserver 0.fr.pool.ntp.org\nserver 1.fr.pool.ntp.org\nserver 2.fr.pool.ntp.org\nserver 3.fr.pool.ntp.org\nserver 0.europe.pool.ntp.org\n\n\n# Africa\nserver tock.nml.csir.co.za\n\n# Asia\nserver 0.asia.pool.ntp.org\n\n# Australia\nserver 0.oceania.pool.ntp.org\n\n# North America\nserver 0.north-america.pool.ntp.org\n\n# South America\nserver 2.south-america.pool.ntp.org\n\ndriftfile /var/lib/ntp/ntp.drift\npidfile   /var/run/ntpd.pid\n\n# Security session\nrestrict    default limited kod nomodify notrap nopeer noquery\nrestrict -6 default limited kod nomodify notrap nopeer noquery\n\nrestrict 127.0.0.1\nrestrict ::1\nEOF\n\n# service\ncd ../pagan-scripts-20260822\nmake DESTDIR=${PKGDIR} install-sysd-ntpd\n"
package: |
  true