archrelease: copy trunk to extra-x86_64
[arch-packages.git] / tftp-hpa / trunk / PKGBUILD
blobc5c3bc665c88523958cbc27d7dba737c0024211e
1 # Maintainer: dorphell <dorphell@archlinux.org>
2 # Contributor: Jose Javier  <jojapa@terra.es>
4 pkgname=tftp-hpa
5 pkgver=5.2
6 pkgrel=9
7 pkgdesc="Official tftp server"
8 arch=('x86_64')
9 url="https://www.kernel.org/pub/software/network/tftp/tftp-hpa/"
10 license=('BSD')
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 
15        LICENSE
16        tftpd.conf
17        tftpd.service
18        tftpd.socket
19        tftp-hpa-0.49-fortify-strcpy-crash.patch)
20 md5sums=('3de3038e7c2bf6fc5d496825893ac8e7'
21          '6ce21e27b6fdc1a1adf85c81e42aeecf'
22          'b372088e550683df5ea8528ca6bbed1f'
23          'ddd0028f77f131f3839bde92202305c4'
24          'b04b9eb0bd049fa59dd518587a26d1c4'
25          '22e8629ef19bc276a102c5d4d284c1bd')
27 prepare() {
28   cd ${pkgname}-${pkgver}
29   # fix #28103
30   patch -Np1 -i ../tftp-hpa-0.49-fortify-strcpy-crash.patch
33 build() {
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 
37   make
40 package() {
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"