| 1 | #!/bin/bash |
| 2 | |
| 3 | BRANCH=${TRAVIS_BRANCH:-master} |
| 4 | VERSION=${PACKAGE_VERSION:-1.3.8rc1} |
| 5 | |
| 6 | # Make sure that the necessary packages/tools are installed |
| 7 | yum install -y \ |
| 8 | epel-release \ |
| 9 | gcc \ |
| 10 | git \ |
| 11 | imake \ |
| 12 | make \ |
| 13 | rpm-build |
| 14 | |
| 15 | # These are for the basic proftpd build |
| 16 | yum install -y \ |
| 17 | gettext \ |
| 18 | libacl-devel \ |
| 19 | libcap-devel \ |
| 20 | ncurses-devel \ |
| 21 | pam-devel \ |
| 22 | pkgconfig \ |
| 23 | zlib-devel |
| 24 | |
| 25 | # And these are for --with everything |
| 26 | yum install -y \ |
| 27 | geoip-devel \ |
| 28 | hiredis-devel \ |
| 29 | libmemcached-devel \ |
| 30 | libsodium-devel \ |
| 31 | mysql-devel \ |
| 32 | openldap-devel \ |
| 33 | openssl-devel \ |
| 34 | pcre-devel \ |
| 35 | postgresql-devel \ |
| 36 | sqlite-devel \ |
| 37 | tcp_wrappers-devel |
| 38 | |
| 39 | # Build the RPM |
| 40 | rm -fr rpm/ |
| 41 | mkdir rpm/ |
| 42 | cd rpm/ |
| 43 | git clone -q -b "${BRANCH}" --depth 10 https://github.com/proftpd/proftpd.git "proftpd-${VERSION}" |
| 44 | cd "proftpd-${VERSION}/" |
| 45 | ./configure |
| 46 | make dist |
| 47 | cd .. |
| 48 | tar zcf "proftpd-${VERSION}.tar.gz" "proftpd-${VERSION}" |
| 49 | rpmbuild -ta "proftpd-${VERSION}.tar.gz" --with everything |