summaryrefslogtreecommitdiff
path: root/extra/tftp-hpa/PKGBUILD
blob: 9d2733395a3e5d5cbbea071ee0b61ad4fc6afe7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# $Id: PKGBUILD 186770 2013-05-31 05:42:13Z eric $
# Maintainer: dorphell <dorphell@archlinux.org>
# Contributor: Jose Javier  <jojapa@terra.es>
pkgname=tftp-hpa
pkgver=5.2
pkgrel=4
pkgdesc="Official tftp server"
arch=('i686' 'x86_64')
url="http://www.kernel.org/pub/software/network/tftp/tftp-hpa/"
license=('BSD')
depends=('readline>=6.0.00')
conflicts=('netkit-tftp')
source=(http://www.kernel.org/pub/software/network/tftp/tftp-hpa/$pkgname-$pkgver.tar.gz 
       LICENSE
       tftpd.service
       tftpd.socket
       tftp-hpa-0.49-fortify-strcpy-crash.patch)
md5sums=('3de3038e7c2bf6fc5d496825893ac8e7'
         '6ce21e27b6fdc1a1adf85c81e42aeecf'
         'ffeac33192eac4c526657b6789cace21'
         'a23369ea33be8b4a5427ec2cfc5373dd'
         '22e8629ef19bc276a102c5d4d284c1bd')

prepare() {
  cd ${pkgname}-${pkgver}
  # fix #28103
  patch -Np1 -i ../tftp-hpa-0.49-fortify-strcpy-crash.patch
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --mandir=/usr/share/man --sbindir=/usr/bin --without-tcpwrappers 
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make INSTALLROOT="${pkgdir}" install
  install -d "${pkgdir}/srv/tftp"
  install -D -m655 "${srcdir}/tftpd.service" "${pkgdir}/usr/lib/systemd/system/tftpd.service"
  install -D -m655 "${srcdir}/tftpd.socket" "${pkgdir}/usr/lib/systemd/system/tftpd.socket"
  install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  # Remove conflict with iputils
  rm "${pkgdir}/usr/share/man/man8/tftpd.8"  
}