blob: ab79f65bcf954a8eb6fe0fddacef85a8f4563856 (
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
pkgname=shibboleth-sp
pkgver=3.5.0
pkgrel=1
pkgdesc="Shibboleth SAML2 Service Provider (including Apache mod_shib)"
url="https://shibboleth.atlassian.net/wiki/spaces/SP3/overview"
license=(Apache)
arch=(x86_64)
depends=(
curl
gcc-libs
krb5
#libmemcached
libsystemd
log4shib
opensaml
openssl
unixodbc
xerces-c
xml-security-c
xmltooling
)
makedepends=(
apache
boost
doxygen
fcgi
perl # for apxs
)
optdepends=(
"apache: To use mod_shib in Apache."
"fcgi: To use shibresponder and shibauthorizer in Nginx/Lighttpd."
)
# Git: git+https://git.shibboleth.net/git/cpp-sp.git
source=("https://shibboleth.net/downloads/service-provider/$pkgver/$pkgname-$pkgver.tar.gz"
"https://shibboleth.net/downloads/service-provider/$pkgver/$pkgname-$pkgver.tar.gz.asc"
"apache.conf"
"shibboleth-sp.sysusers"
"shibboleth-sp.tmpfiles"
"shibd.service")
sha256sums=('ed76aedc3d9935982f743bcc87c505967d0f1f637fe8b5e4b42f3f635d6c2341'
'SKIP'
'ba57a546c213e06c8ff79f7de3daf1927a04ba0dd24f90e6343c2783c9a09c56'
'8df312358f8341b246f08bc8b8691f49b00dd3fe639061aa24f60a5ddb9551db'
'425b561c7e3c582aae635e2f41448cdf10e393ab39209668ab3063fd13acebcd'
'9f2d48c1cd3b80108c1a567ed6778272880c53e8c647b16f18084d681c3b8671')
validpgpkeys=('DCAA15007BED9DE690CD9523378B845402277962')
install=$pkgname.install
backup=(etc/shibboleth/attrChecker.html
etc/shibboleth/attribute-map.xml
etc/shibboleth/attribute-policy.xml
etc/shibboleth/bindingTemplate.html
etc/shibboleth/console.logger
etc/shibboleth/discoveryTemplate.html
etc/shibboleth/globalLogout.html
etc/shibboleth/localLogout.html
etc/shibboleth/metadataError.html
etc/shibboleth/native.logger
etc/shibboleth/partialLogout.html
etc/shibboleth/postTemplate.html
etc/shibboleth/protocols.xml
etc/shibboleth/security-policy.xml
etc/shibboleth/sessionError.html
etc/shibboleth/shibboleth2.xml
etc/shibboleth/shibd.logger
etc/shibboleth/sslError.html)
prepare() {
cd "$pkgname-$pkgver"
}
build() {
cd "$pkgname-$pkgver"
export CXXFLAGS+=" -std=gnu++14"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--sbindir=/usr/bin \
--localstatedir=/var \
--enable-apache-24 \
--enable-systemd \
--with-apxs24=/usr/bin/apxs \
--with-fastcgi \
--with-gssapi \
;
make
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
# Apache module
mkdir -p "$pkgdir"/usr/lib/httpd/modules
mv -v "$pkgdir"/usr/lib/shibboleth/mod_shib_24.so \
"$pkgdir"/usr/lib/httpd/modules/mod_shib.so
# Scripts
for _x in keygen metagen seckeygen; do
mv -v "$pkgdir"/etc/shibboleth/$_x.sh "$pkgdir"/usr/bin/shib-$_x
done
for _x in mdquery resolvertest; do
mv -v "$pkgdir"/usr/bin/$_x "$pkgdir"/usr/bin/shib-$_x
done
# Remove keys generated during installation
rm -vf "$pkgdir"/etc/shibboleth/sp-*.pem
# Remove duplicates of every config file
mkdir -p "$pkgdir"/usr/share/$pkgname/dist
mv "$pkgdir"/etc/shibboleth/example-*.xml "$pkgdir"/usr/share/$pkgname/
mv "$pkgdir"/etc/shibboleth/*.dist "$pkgdir"/usr/share/$pkgname/dist/
# Remove the bundled Apache and init.d examples
rm -vf "$pkgdir"/etc/shibboleth/apache*.config
rm -vf "$pkgdir"/etc/shibboleth/shibd-*
# Provide our own Apache and systemd examples
install -Dm0644 "$srcdir"/apache.conf \
"$pkgdir"/usr/share/$pkgname/apache.conf
install -Dm0644 "$srcdir"/shibboleth-sp.sysusers \
"$pkgdir"/usr/lib/sysusers.d/shibboleth-sp.conf
install -Dm0644 "$srcdir"/shibboleth-sp.tmpfiles \
"$pkgdir"/usr/lib/tmpfiles.d/shibboleth-sp.conf
install -Dm0644 "$srcdir"/shibd.service \
"$pkgdir"/usr/lib/systemd/system/shibd.service
# Match tmpfiles.d
rm -rf "$pkgdir"/var/run
chmod 0700 "$pkgdir"/var/cache/shibboleth
chmod 0750 "$pkgdir"/var/log/shibboleth
}
# vim: ts=2:sw=2:et:
|