1 # Maintainer: dorphell <dorphell@archlinux.org>
2 # Contributor: Jose Javier <jojapa@terra.es>
7 pkgdesc="Official tftp server"
9 url="https://www.kernel.org/pub/software/network/tftp/tftp-hpa/"
11 backup=('etc/conf.d/tftpd')
12 install='tftpd.install'
13 depends=('readline>=6.0.00')
14 source=(https://www.kernel.org/pub/software/network/tftp/tftp-hpa/$pkgname-$pkgver.tar.gz
19 tftp-hpa-0.49-fortify-strcpy-crash.patch)
20 sha256sums=('acc04dde662491e3092565ecf9bde504c47dbb1bb0408366009b138fe7754cab'
21 '628639fd20f1716bfd71a8bc4bf983fd16eb004cc1ec5a4abf99e6618cfcb870'
22 'f4bbc89a460da40f0914ebf55edce0306090e11073ea31f6ffc11d62b527ece4'
23 'da79f8d3791daa91624677d4b3ace91b63965c87c6791e3ce0155637609c6cb1'
24 '22af7da2cb61a119cfcba65f740ff0a35157204218dcbdbf13e14dbf74043ff2'
25 '4862bc4bf61b8abbcfc22c4bc6714a5cf8d52e9db1b1d7f7b4c5059ef89ced2f')
28 cd ${pkgname}-${pkgver}
30 patch -Np1 -i ../tftp-hpa-0.49-fortify-strcpy-crash.patch
34 cd ${pkgname}-${pkgver}
35 CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
36 ./configure --prefix=/usr --mandir=/usr/share/man --sbindir=/usr/bin --without-tcpwrappers
41 cd ${pkgname}-${pkgver}
42 make INSTALLROOT="${pkgdir}" install
43 install -D -m644 "${srcdir}/tftpd.conf" "$pkgdir/etc/conf.d/tftpd"
44 install -d "${pkgdir}/srv/tftp"
45 install -D -m644 "${srcdir}/tftpd.service" "${pkgdir}/usr/lib/systemd/system/tftpd.service"
46 install -D -m644 "${srcdir}/tftpd.socket" "${pkgdir}/usr/lib/systemd/system/tftpd.socket"
47 install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
48 # Remove conflict with iputils
49 rm "${pkgdir}/usr/share/man/man8/tftpd.8"