58 lines
2.4 KiB
Bash
58 lines
2.4 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=tftp-hpa
|
|
pkgver=5.2
|
|
_debver=$pkgver
|
|
_debrel=1.4
|
|
pkgrel=4
|
|
pkgdesc="Official tftp server"
|
|
arch=(i686 x86_64)
|
|
url='https://www.kernel.org/pub/software/network/tftp/tftp-hpa/'
|
|
license=('Original-BSD')
|
|
backup=('etc/conf.d/tftpd')
|
|
depends=('readline')
|
|
source=(https://www.kernel.org/pub/software/network/tftp/tftp-hpa/$pkgname-$pkgver.tar.gz
|
|
LICENSE::https://metadata.ftp-master.debian.org/changelogs//main/t/tftp-hpa/tftp-hpa_${_debver}+20150808-${_debrel}_copyright
|
|
tftpd.confd
|
|
tftpd.initd
|
|
tftpd.run
|
|
fix-common.patch
|
|
tftp-hpa-0.49-fortify-strcpy-crash.patch)
|
|
sha512sums=('d79c9bd41ccf573d44ae5c4d72726c27ed2f84c8fc4f7bb12e26c3deb9bee0ececcef8b4a49cca9c59da1673f1181e5187fd4ac0cbdc5285ca18f02c4788b89e'
|
|
'3f26f4fa1067fd4f62c85256ff989cfb0c55af5373d7e9a4eed2d61e45f2467a67a2824701a210326c8906a558b7b01d67e59ef9c7abc53afac676f568254262'
|
|
'd6a28715c97133794a2c4bd955a0dbe830767e0e3fa3ae0ad1f08bdebf348225633b6e49cd1785906e1ac0d2e016f34222c4724bae9933670a4bd16b128f9eee'
|
|
'cf1fe93a7618968365e473f3286d5fffceaaa75a30ce68e9268163fb00d2aef21afd08b4b293b1bd95b07200016d8cdaf9511fad43cf9aba5cd1610cd45b44af'
|
|
'7161e39e269ebf250b162f768ef904b14abbb292cb61ed2fab7c080caa6d3642e3586d88d56f7ed20f64bb4395bc15df1cdc682cd86cc44135d362fe2e840770'
|
|
'40127e7ce276a2bc015255dbeef2665bfe8ff006b1e1d8fb79797e946d6030fd74606cffe0bea11eaad276a693f223faaaf1c1ccb5f276b40fdad40b366172b7'
|
|
'ef2cecfb1509381b6c730fb4e2a1790d180f37a9f009ee89dbd04f4deabd92ca87158d3fa4eae11824a1235113f288627c4c00058c64cda7d83dd624c6b0469a')
|
|
|
|
prepare() {
|
|
cd ${pkgname}-${pkgver}
|
|
patch -Np1 -i ${srcdir}/tftp-hpa-0.49-fortify-strcpy-crash.patch
|
|
patch -Np1 -i ${srcdir}/fix-common.patch
|
|
}
|
|
|
|
build() {
|
|
cd ${pkgname}-${pkgver}
|
|
CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
|
|
./configure \
|
|
--prefix=/usr \
|
|
--mandir=/usr/share/man \
|
|
--without-tcpwrappers
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd ${pkgname}-${pkgver}
|
|
make INSTALLROOT="${pkgdir}" install
|
|
install -d "$pkgdir"/var/tftpboot
|
|
|
|
# openrc and runit
|
|
install -Dm0644 "$srcdir/tftpd.confd" "${pkgdir}/etc/conf.d/tftpd"
|
|
install -Dm0755 "$srcdir/tftpd.initd" "${pkgdir}/etc/init.d/tftpd"
|
|
install -Dm0755 "$srcdir/tftpd.run" "${pkgdir}/etc/sv/tftpd/run"
|
|
|
|
# license
|
|
install -Dm0644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
}
|