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
|
@ -29,37 +29,30 @@ build:
|
|||
dependencies:
|
||||
gnu.org/libtool: '*'
|
||||
gnu.org/autoconf: '*'
|
||||
script: |
|
||||
./configure $ARGS
|
||||
make
|
||||
make install
|
||||
script:
|
||||
- ./configure $ARGS
|
||||
- make
|
||||
- make install
|
||||
|
||||
HTTPD_CONF=$(tea httpd -V 2>/dev/null | grep SERVER_CONFIG_FILE | sed 's/.*"\(.*\)"/\1/')
|
||||
port=8080
|
||||
while lsof -i:$port >/dev/null 2>&1; do
|
||||
((port++))
|
||||
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
|
||||
- HTTPD_CONF=$({{prefix}}/bin/httpd -V 2>/dev/null | grep SERVER_CONFIG_FILE | sed 's/.*"\(.*\)"/\1/')
|
||||
- |
|
||||
sed -i.bak 's/#ServerName www.example.com:8080/ServerName localhost:8080/g' {{prefix}}/$HTTPD_CONF
|
||||
rm {{prefix}}/$HTTPD_CONF.bak
|
||||
|
||||
cd "{{prefix}}/bin"
|
||||
- run: |
|
||||
sed -i.bak \
|
||||
-e "s_{{prefix}}_\$(cd \$(dirname \$0)/.. \&\& pwd)_g" \
|
||||
-e "s/^HTTPD=\'\(.*\)\'$/HTTPD=\"\1\"/" \
|
||||
apachectl envvars envvars-std
|
||||
sed -i.bak \
|
||||
-e 's_{{prefix}}_$(cd $(dirname $0)/.. && pwd)_g' \
|
||||
-e 's/^HTTPD='\''\(.*\)'\''$/HTTPD="$(cd $(dirname $0)\/.. \&\& pwd)\/bin\/httpd"/' \
|
||||
apachectl envvars envvars-std
|
||||
|
||||
rm apachectl.bak envvars.bak envvars-std.bak
|
||||
cd ../conf
|
||||
working-directory: ${{prefix}}/bin
|
||||
|
||||
- run: |
|
||||
sed -i.bak \
|
||||
-e 's_{{prefix}}_\${HTTPD\_ROOT}_' \
|
||||
-e 's|{{prefix}}|\${HTTPD_ROOT}|' \
|
||||
httpd.conf
|
||||
rm httpd.conf.bak
|
||||
working-directory: ${{prefix}}/conf
|
||||
|
||||
env:
|
||||
ARGS:
|
||||
|
@ -105,6 +98,6 @@ provides:
|
|||
- bin/suexec
|
||||
|
||||
test:
|
||||
script: |
|
||||
httpd -v | grep {{version}}
|
||||
apachectl -t -f "$APACHE_CONFDIR/httpd.conf"
|
||||
script:
|
||||
- httpd -v | grep {{version}}
|
||||
- apachectl -t -f "$APACHE_CONFDIR/httpd.conf"
|
||||
|
|
Loading…
Reference in a new issue