aboutsummaryrefslogtreecommitdiffstats
path: root/main/vsftpd/APKBUILD
blob: ef353ee3e6c1755f44145894597f2311d5de0dd7 (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
46
47
48
49
50
51
52
53
54
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vsftpd
pkgver=3.0.2
pkgrel=2
pkgdesc="Very secure ftpd"
url="http://vsftpd.beasts.org"
arch="all"
license="GPL"
depends=
makedepends="openssl-dev libcap-dev linux-pam-dev"
subpackages="$pkgname-doc"
install="$pkgname.pre-install"
source="https://security.appspot.com/downloads/vsftpd-${pkgver}.tar.gz
	vsftpd-enable-ssl.patch
	vsftpd-gnu-source.patch
	vsftpd.initd
	vsftpd.confd"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd $_builddir
	#Enable SSL support 
	patch -p0 -i "$srcdir"/vsftpd-enable-ssl.patch || return 1
	#build fix for x86_64
	patch -p1 -i "$srcdir"/vsftpd-gnu-source.patch || return 1
	# we dont have libnsl
	sed -i -e '/-lnsl/d' vsf_findlibs.sh || return 1 
	# Let abuild control stripping
	sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile
}

build() {
	cd $_builddir
	make || return 1
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	install -m755 -D vsftpd "$pkgdir"/usr/sbin/vsftpd
	install -m644 -D vsftpd.8 "$pkgdir"/usr/share/man/man8/vsftpd.8
	install -m644 -D vsftpd.conf.5 "$pkgdir"/usr/share/man/man5/vsftpd.conf.5
	install -m644 -D vsftpd.conf "$pkgdir"/etc/vsftpd/vsftpd.conf
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	mkdir -p "$pkgdir"/usr/share/empty
}

md5sums="8b00c749719089401315bd3c44dddbb2  vsftpd-3.0.2.tar.gz
f3cbaf364cd3c46a2a03b00de9d7e184  vsftpd-enable-ssl.patch
f2245efcc271356743805f38d6c5aea3  vsftpd-gnu-source.patch
b48784af42b0f787e55276fc20476aa2  vsftpd.initd
9e495776096c78c3f9d9e6756a8c3003  vsftpd.confd"