123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #!/bin/bash
- DESTDIR=./dist
- VERSION=$(git describe --tag | sed 's/^v//')
- ITERATION=1
- NAME=scw-apache-lua
- SERVICE_FILE="$NAME.conf"
- SERVICE_DIR="/etc/systemd/system/httpd.service.d"
- PKG_TYPE=rpm
- DESCR="ScraperWall Integration of Blacklist, Captcha and Apache"
- OUTDIR=./rpms-centos7
- RPM_DIR=/opt/rpm.scraperwall.com/centos7
- rm -rf $DESTDIR
- install -d $DESTDIR/usr/local/httpd
- install -d $DESTDIR/etc/default
- install -d $DESTDIR/etc/httpd/conf.d
- install -d ${DESTDIR}${SERVICE_DIR}
- install -v -m 644 scw-apache-lua.conf ${DESTDIR}${SERVICE_DIR}/${SERVICE_FILE}
- install -v -m 644 centos7-httpd-lua.conf $DESTDIR/etc/httpd/conf.d/scw-apache-lua.conf
- cp -rv lua $DESTDIR/usr/local/httpd
- install -v -m 644 default $DESTDIR/etc/default/$NAME
- fpm -s dir -t $PKG_TYPE -C $DESTDIR --name $NAME \
- --version $VERSION \
- --iteration $ITERATION \
- --description "$DESCR" \
- --config-files "etc/default/$NAME" \
- -p $OUTDIR \
- --rpm-sign
- ok=$?
- rm -rf $DESTDIR
- rpm_file="$OUTDIR/$NAME-$VERSION-$ITERATION.x86_64.rpm"
- if [ $ok -eq 0 -a -f "$rpm_file" ]; then
-
- cp "$rpm_file" "$RPM_DIR"
- (cd "$RPM_DIR" && \
- createrepo -v . && \
- rsync -av --progress --delete . fender.spyz.org:/srv/http-vhosts/rpm.scraperwall.com/centos7/)
- fi
|