archrelease: copy trunk to extra-x86_64
[arch-packages.git] / tftp-hpa / repos / extra-x86_64 / PKGBUILD
blobc4ca987937abc1dcdf25270d02c01333938c64b2
1 # Maintainer: dorphell <dorphell@archlinux.org>
2 # Contributor: Jose Javier  <jojapa@terra.es>
4 pkgname=tftp-hpa
5 pkgver=5.2
6 pkgrel=10
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 sha256sums=('acc04dde662491e3092565ecf9bde504c47dbb1bb0408366009b138fe7754cab'
21             '628639fd20f1716bfd71a8bc4bf983fd16eb004cc1ec5a4abf99e6618cfcb870'
22             'f4bbc89a460da40f0914ebf55edce0306090e11073ea31f6ffc11d62b527ece4'
23             'da79f8d3791daa91624677d4b3ace91b63965c87c6791e3ce0155637609c6cb1'
24             '22af7da2cb61a119cfcba65f740ff0a35157204218dcbdbf13e14dbf74043ff2'
25             '4862bc4bf61b8abbcfc22c4bc6714a5cf8d52e9db1b1d7f7b4c5059ef89ced2f')
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"