mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
parent
6b33636d4c
commit
49eb02b291
1 changed files with 27 additions and 34 deletions
|
@ -22,44 +22,37 @@ dependencies:
|
||||||
|
|
||||||
runtime:
|
runtime:
|
||||||
env:
|
env:
|
||||||
HTTPD_ROOT: '{{prefix}}'
|
HTTPD_ROOT: '{{prefix}}'
|
||||||
APACHE_CONFDIR: '{{prefix}}/conf'
|
APACHE_CONFDIR: '{{prefix}}/conf'
|
||||||
|
|
||||||
build:
|
build:
|
||||||
dependencies:
|
dependencies:
|
||||||
gnu.org/libtool: '*'
|
gnu.org/libtool: '*'
|
||||||
gnu.org/autoconf: '*'
|
gnu.org/autoconf: '*'
|
||||||
script: |
|
script:
|
||||||
./configure $ARGS
|
- ./configure $ARGS
|
||||||
make
|
- make
|
||||||
make install
|
- make install
|
||||||
|
|
||||||
HTTPD_CONF=$(tea httpd -V 2>/dev/null | grep SERVER_CONFIG_FILE | sed 's/.*"\(.*\)"/\1/')
|
- HTTPD_CONF=$({{prefix}}/bin/httpd -V 2>/dev/null | grep SERVER_CONFIG_FILE | sed 's/.*"\(.*\)"/\1/')
|
||||||
port=8080
|
- |
|
||||||
while lsof -i:$port >/dev/null 2>&1; do
|
sed -i.bak 's/#ServerName www.example.com:8080/ServerName localhost:8080/g' {{prefix}}/$HTTPD_CONF
|
||||||
((port++))
|
rm {{prefix}}/$HTTPD_CONF.bak
|
||||||
done
|
|
||||||
if [ "$port" -ne 8080 ]; then
|
|
||||||
sed -i '' "s/Listen 8080/Listen $port/" {{prefix}}/$HTTPD_CONF
|
|
||||||
fi
|
|
||||||
sed -i.bak 's/#ServerName www.example.com:8080/ServerName localhost:'"$port"'/g' {{prefix}}/$HTTPD_CONF
|
|
||||||
|
|
||||||
cd "{{prefix}}/bin"
|
- run: |
|
||||||
sed -i.bak \
|
sed -i.bak \
|
||||||
-e "s_{{prefix}}_\$(cd \$(dirname \$0)/.. \&\& pwd)_g" \
|
-e "s_{{prefix}}_\$(cd \$(dirname \$0)/.. \&\& pwd)_g" \
|
||||||
-e "s/^HTTPD=\'\(.*\)\'$/HTTPD=\"\1\"/" \
|
-e 's/^HTTPD='\''\(.*\)'\''$/HTTPD="$(cd $(dirname $0)\/.. \&\& pwd)\/bin\/httpd"/' \
|
||||||
apachectl envvars envvars-std
|
apachectl envvars envvars-std
|
||||||
sed -i.bak \
|
rm apachectl.bak envvars.bak envvars-std.bak
|
||||||
-e 's_{{prefix}}_$(cd $(dirname $0)/.. && pwd)_g' \
|
working-directory: ${{prefix}}/bin
|
||||||
-e 's/^HTTPD='\''\(.*\)'\''$/HTTPD="$(cd $(dirname $0)\/.. \&\& pwd)\/bin\/httpd"/' \
|
|
||||||
apachectl envvars envvars-std
|
|
||||||
|
|
||||||
rm apachectl.bak envvars.bak envvars-std.bak
|
- run: |
|
||||||
cd ../conf
|
sed -i.bak \
|
||||||
sed -i.bak \
|
-e 's|{{prefix}}|\${HTTPD_ROOT}|' \
|
||||||
-e 's_{{prefix}}_\${HTTPD\_ROOT}_' \
|
httpd.conf
|
||||||
httpd.conf
|
rm httpd.conf.bak
|
||||||
rm httpd.conf.bak
|
working-directory: ${{prefix}}/conf
|
||||||
|
|
||||||
env:
|
env:
|
||||||
ARGS:
|
ARGS:
|
||||||
|
@ -104,7 +97,7 @@ provides:
|
||||||
- bin/rotatelogs
|
- bin/rotatelogs
|
||||||
- bin/suexec
|
- bin/suexec
|
||||||
|
|
||||||
test:
|
test:
|
||||||
script: |
|
script:
|
||||||
httpd -v | grep {{version}}
|
- httpd -v | grep {{version}}
|
||||||
apachectl -t -f "$APACHE_CONFDIR/httpd.conf"
|
- apachectl -t -f "$APACHE_CONFDIR/httpd.conf"
|
||||||
|
|
Loading…
Reference in a new issue