aboutsummaryrefslogtreecommitdiffstats
path: root/main/apache2/APKBUILD
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2016-11-04 18:29:22 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2016-11-04 18:31:38 +0200
commitfbaa29e60dadca4224fa90384237d57eb101c376 (patch)
tree067a09ebd2674c15c3dacdcd3682ed5b0cb71290 /main/apache2/APKBUILD
parent31a5bffd356ee50fd79d38a8833b992ead564d28 (diff)
downloadaports-fbaa29e60dadca4224fa90384237d57eb101c376.tar.gz
aports-fbaa29e60dadca4224fa90384237d57eb101c376.tar.bz2
aports-fbaa29e60dadca4224fa90384237d57eb101c376.tar.xz
main/apache2: generate simple module config files
fixes #6099 fixes #6100
Diffstat (limited to 'main/apache2/APKBUILD')
-rw-r--r--main/apache2/APKBUILD55
1 files changed, 27 insertions, 28 deletions
diff --git a/main/apache2/APKBUILD b/main/apache2/APKBUILD
index b5562644b0..b824aecae9 100644
--- a/main/apache2/APKBUILD
+++ b/main/apache2/APKBUILD
@@ -3,7 +3,7 @@
pkgname=apache2
_pkgreal=httpd
pkgver=2.4.23
-pkgrel=9
+pkgrel=10
pkgdesc="A high performance Unix-based HTTP server"
url="http://httpd.apache.org/"
arch="all"
@@ -30,10 +30,6 @@ source="http://archive.apache.org/dist/$_pkgreal/$_pkgreal-$pkgver.tar.bz2
apache2.confd
apache2.logrotate
apache2.initd
- http2.conf
- ldap.conf
- proxy.conf
- lua.conf
alpine.layout
conf/0001-httpd.conf-ServerRoot.patch
conf/0002-httpd.conf-ServerTokens.patch
@@ -155,10 +151,27 @@ package() {
done
}
+_make_conf_dir() {
+ _conf_dir=$subpkgdir/etc/apache2/conf.d
+ install -d "$_conf_dir"
+}
+
_mv_conf() {
- install -d "$subpkgdir"/etc/apache2/conf.d && \
- mv "$pkgdir"/etc/apache2/conf.d/$1.conf \
- "$subpkgdir"/etc/apache2/conf.d
+ _make_conf_dir && mv "$pkgdir"/etc/apache2/conf.d/$1.conf "$_conf_dir"
+}
+
+_load_mod() {
+ _make_conf_dir
+ echo "LoadModule $1_module modules/mod_$1.so" >> \
+ "$_conf_dir"/${subpkgname#$pkgname-}.conf
+}
+
+_load_mods() {
+ local path mod
+ for path in "$subpkgdir"/usr/lib/apache2/mod_*.so; do
+ mod=${path##/*mod_}
+ _load_mod ${mod%.so}
+ done
}
# include the builddir and apxs in -dev package
@@ -196,8 +209,7 @@ http2() {
install -d "$subpkgdir"/usr/lib/apache2
mv "$pkgdir"/usr/lib/apache2/mod_http2.so \
"$subpkgdir"/usr/lib/apache2 || return 1
- install -D -m644 "$srcdir"/http2.conf \
- "$subpkgdir"/etc/apache2/conf.d/http2.conf || return 1
+ _load_mods
}
icons() {
@@ -240,8 +252,7 @@ ldap() {
install -d "$subpkgdir"/usr/lib/apache2 || return 1
mv "$pkgdir"/usr/lib/apache2/mod_*ldap.so \
"$subpkgdir"/usr/lib/apache2/ || return 1
- install -D -m644 "$srcdir"/ldap.conf \
- "$subpkgdir"/etc/apache2/conf.d/ldap.conf || return 1
+ _load_mods
}
webdav() {
@@ -272,8 +283,9 @@ proxy() {
mv "$pkgdir"/usr/lib/apache2/mod_proxy*.so \
"$pkgdir"/usr/lib/apache2/mod_lbmethod_*.so \
"$subpkgdir"/usr/lib/apache2/ || return 1
- install -D -m644 "$srcdir"/proxy.conf \
- "$subpkgdir"/etc/apache2/conf.d/proxy.conf || return 1
+
+ _load_mod watchdog
+ _load_mods
}
_lua() {
@@ -282,17 +294,12 @@ _lua() {
install -d "$subpkgdir"/usr/lib/apache2 || return 1
mv "$pkgdir"/usr/lib/apache2/mod_lua.so \
"$subpkgdir"/usr/lib/apache2/ || return 1
- install -D -m644 "$srcdir"/lua.conf \
- "$subpkgdir"/etc/apache2/conf.d/lua.conf || return 1
+ _load_mods
}
md5sums="04f19c60e810c028f5240a062668a688 httpd-2.4.23.tar.bz2
257d2572921dd4506b0464441f88fab4 apache2.confd
8519af87c57b50441866ad4216e4d663 apache2.logrotate
11b2718d7a0550498aaddf41e940ad04 apache2.initd
-f1744ed54eed806d8523f177ee73d536 http2.conf
-b70fe826486043e3953cfe21f9e6fa16 ldap.conf
-96eddccfca1ec0349f844e2460cf655b proxy.conf
-449a4aea60473ac4a16f025fca4463e3 lua.conf
699aec01d2f7c5a67c10d0fe280780b7 alpine.layout
56bbe9e4e83bbea1366dc107471ab64e 0001-httpd.conf-ServerRoot.patch
3bd91de3d0063eafa0a07a950fb9041d 0002-httpd.conf-ServerTokens.patch
@@ -313,10 +320,6 @@ sha256sums="0c1694b2aad7765896faf92843452ee2555b9591ae10d4f19b245f2adfe85e58 ht
6ca904ad65c1a4122d8ea4a3303ea8184429a4a4d7fb81defc30f3e184258c0a apache2.confd
8e2a8870d51796cf04cc7d8985c43e36afe9ae79e2d6765050a0e72c0de8dce7 apache2.logrotate
8761faa68c2db7114b3f463f3b8ef1aec8f8373da9908d943cc765765914ab36 apache2.initd
-f7db734acf3a215fb9d89891a9a357b35ed59390b1c7ceadea511cb1979b4187 http2.conf
-25771023d7c921a13c792607d47bd716c92698b20af21c018f0922eaf79a9604 ldap.conf
-00c42b7806eaa73e732be9d9e92c3e841b20c6d91a9920be47f19db8aee3513e proxy.conf
-edf701795137566c7cf4b9c0c95ecd5f8c58269f5600217a0a4d289d2bf15384 lua.conf
c40668ae8384d0555488660b68eda16ad8ccb11fde16a8197d33bed739fed1e8 alpine.layout
2e078ca7c99d78b0bf1d7eaa471d257f98af0aeb3d442e761552749981c8f503 0001-httpd.conf-ServerRoot.patch
f9ad9b6fbdb6dd77b77e39410f061e4d155e83ac7943d4f3c8e783b75c4bca78 0002-httpd.conf-ServerTokens.patch
@@ -337,10 +340,6 @@ sha512sums="c520de5be748c0a785ef0dc77102749eb4f47e224968b8d4bed2ae644faa0964623a
8e62b101f90c67babe864bcb74f711656180b011df3fd4b541dc766b980b72aa409e86debf3559a55be359471c1cad81b8779ef3a55add8d368229fc7e9544fc apache2.confd
18e8859c7d99c4483792a5fd20127873aad8fa396cafbdb6f2c4253451ffe7a1093a3859ce719375e0769739c93704c88897bd087c63e1ef585e26dcc1f5dd9b apache2.logrotate
81a2d2a297d8049ba1b021b879ec863767149e056d9bdb2ac8acf63572b254935ec96c2e1580eba86639ea56433eec5c41341e4f1501f9072745dccdb3602701 apache2.initd
-86f693b3c4e4d8d9639b6deae13c7f26e2761cad7714dd61609c8db6d495dc6e88a7421a1086486adf68c374270db9f709626519f73a64019ae958692bae030c http2.conf
-fbdc28ea4b94af91640794945ac4e1f45e4200e54d5bdf64c0c03fc8bdb589e444cc4f7dd0b70b696c0e5e033c8489b8bd8f8fd090906c4379651c7d032c2449 ldap.conf
-aabbe171219f15efe47f8e972fc1a43f98b48977aae91b597b65bb447027992bf81757bde68b26a67e5e3b9f2e748d94b3c85d5c07433627b6048d60a51d400b proxy.conf
-f2950005ac0d8c7a5e34958f1274c9ed0f5f634a5bc766e12834917937df9db901c5fc2460da70e1a62f17440d4719163cd4213496dbf579c80a789b8e18f65c lua.conf
177c58d049fc4476fd9b9b36b67725145777c84cf81948105c9314cb09312dff6c1931fe21aaa243597abaefded6c6dfd80d83839e45a23950b50de615d73b06 alpine.layout
b55051f1358fb957cb24ea5d7cf6106822935c5fe3d1f4bb071d4caff5daa46c31c4fc81ec1f2ce0335a634e8b7545f2265c3d28bea3b0799b9ff589ba36c24a 0001-httpd.conf-ServerRoot.patch
948299dd3b5b004276394a4ce94005a011cfe14e032e7cdce060bf0f6123835020419226cc0fe78cbefba996c0c2eebd1b8d713d2f1b424e0e6f58b1e589bc3f 0002-httpd.conf-ServerTokens.patch