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 md5sums=('3de3038e7c2bf6fc5d496825893ac8e7'
21 '6ce21e27b6fdc1a1adf85c81e42aeecf'
22 'b372088e550683df5ea8528ca6bbed1f'
23 'ddd0028f77f131f3839bde92202305c4'
24 'b04b9eb0bd049fa59dd518587a26d1c4'
25 '22e8629ef19bc276a102c5d4d284c1bd')
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"