blob: 0b958590fbd6fd77c904d858100b40f73bddd9ac (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# Maintainer: solsTiCe d'Hiver <solstice.dhiver@gmail.com>
# Contributor: sulaweyo <sledge.sulaweyo@gmail.com>
# Contributor: dequis <dx@dxzone.com.ar>
# Contributor: Jan Was <janek.jan+arch@gmail.com>
# Great Contributor: mainiak <mainiak@gmail.com> (first maintainer)
# Contributor: spooky <spookyh+arch@gmail.com>
# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux@free.fr>
# Contributor: Florent Peterschmitt <florent@peterschmitt.fr>
# Contributor: Christian Schwarz <me et cschwarz punkt com>
pkgname=apt-cacher-ng
pkgver=3.7.4
pkgrel=10
pkgdesc="A caching proxy specialized for package files"
url="http://www.unix-ag.uni-kl.de/~bloch/acng/"
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
license=('custom')
depends=('zlib' 'bzip2' 'fuse' 'xz' 'openssl' 'libwrap' 'libevent' 'c-ares')
optdepends=('mailcap: to get correct Content-Type header on doc html served by apt-cacher-ng')
makedepends=('cmake')
source=("http://deb.debian.org/debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_${pkgver}.orig.tar.xz"
'add-alarm-mirrorlist.sh'
'acng.conf.patch'
'apt-cacher-ng.service.patch'
'have-strlcpy.patch'
'apt-cacher-ng.tmpfile'
'include-algorithm.patch'
)
backup=('etc/apt-cacher-ng/acng.conf' 'etc/apt-cacher-ng/security.conf')
install=apt-cacher-ng.install
sha256sums=('63140473a669c42f5e2219e38fa9d7c733f9047699dde52c3bd828e372929a5f'
'cf6b3fe3ba76c512765c18f10c6ed886bc31c30f28b7ae93f8d6a13d2e65bf30'
'695c074de35a75730e6b711960993f00f120634276349c8640db2ad883a5ad09'
'c89335ea833fc04ec2ce6598e3fdaf86aa8f2fa0892203eef4c0a5cb24d6c188'
'0d584e8193ab2c63d4d629c4fdca23e09dc369953a60c57cbb4a6138b5136265'
'ead4e80771f88b42d922aff6c62da93ae9c9b001a071043e2092949f2337b459'
'de1356ffb2eee9900132f18bbce4f3f56b176553a4fdf334e48b57630e8d0306')
prepare() {
cd ${srcdir}/${pkgname}-${pkgver}
patch -p0 -i "${srcdir}/have-strlcpy.patch"
patch -p0 -i "${srcdir}/include-algorithm.patch"
# === uncomment the next line to update mirrors [w3m package is needed]; it will take some time ===
#make -f scripts/Makefile.release gendbs
# === uncomment next line to add archlinuxarm mirrors to archlx_mirrors file [wget is needed] ===
#bash ${srcdir}/add-alarm-mirrorlist.sh
}
build() {
cd ${srcdir}/${pkgname}-${pkgver}
rm -rf builddir
mkdir -p builddir
cd builddir
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DRUNDIR=/run \
-DACNG_CACHE_DIR=/var/cache/apt-cacher-ng \
-DACNG_LOG_DIR=/var/log/apt-cacher-ng \
-DEXTRA_LIBS_ACNG=pthread || return 1
make all || return 1
patch -Np0 -i "${srcdir}/acng.conf.patch"
patch -Np0 -i "${srcdir}/apt-cacher-ng.service.patch"
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
make -C builddir install DESTDIR=${pkgdir}
mv ${pkgdir}/usr/sbin/ ${pkgdir}/usr/bin/
mv ${pkgdir}/usr/lib/apt-cacher-ng/{acngfs,acngtool,in.acng} ${pkgdir}/usr/bin
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -D -m644 ${srcdir}/${pkgname}-${pkgver}/builddir/systemd/apt-cacher-ng.service ${pkgdir}/usr/lib/systemd/system/apt-cacher-ng.service
install -D -m644 ${srcdir}/${pkgname}-${pkgver}/builddir/systemd/apt-cacher-ng.conf ${pkgdir}/usr/lib/tmpfiles.d/apt-cacher-ng.conf
mkdir -p ${pkgdir}/var/log/apt-cacher-ng
mkdir -p ${pkgdir}/var/cache/apt-cacher-ng
chmod 600 ${pkgdir}/etc/apt-cacher-ng/security.conf
}
# vim:set ts=2 sw=2 et:
|