diff options
author | Harel Ben-Attia <harelba@gmail.com> | 2014-02-21 10:35:06 -0500 |
---|---|---|
committer | Harel Ben-Attia <harelba@gmail.com> | 2014-02-21 10:50:45 -0500 |
commit | 1f4c5e622a0b32f8e5fb2d4f92f999d0bf477d7e (patch) | |
tree | 91574e380100a93df8fb6b90c115ecb778ba6d87 /create-rpm | |
parent | c7f6a85fcabd990eed22d003038de40914d6f1f9 (diff) |
Added license + RPM packaging logic + man page
Diffstat (limited to 'create-rpm')
-rwxr-xr-x | create-rpm | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/create-rpm b/create-rpm new file mode 100755 index 0000000..9ec007f --- /dev/null +++ b/create-rpm @@ -0,0 +1,31 @@ +#!/bin/bash + +if [ $# -ne 1 ]; +then + echo 'create-rpm <version>' + exit 1 +fi + +VERSION=$1 +REAL_PACKAGE_NAME=q +RPM_PACKAGE_NAME=q +MAN_PAGE_SRC=${RPM_PACKAGE_NAME}.manpage.1.ronn + +rm -rf build/ + +mkdir -p build/rpm + +TAR_NAME=${RPM_PACKAGE_NAME}-${VERSION}.tar.gz + +ronn ${REAL_PACKAGE_NAME}.manpage.1.ronn +rm ${REAL_PACKAGE_NAME}.1.html + +cat ${RPM_PACKAGE_NAME}.spec.template | sed "s/VERSION_PLACEHOLDER/$1/" > ${RPM_PACKAGE_NAME}.spec + +tar --create --transform s,^,${RPM_PACKAGE_NAME}-$1/, --exclude ${RPM_PACKAGE_NAME}.spec.template -f ${TAR_NAME} * + +rpmbuild --define "_topdir `pwd`/build/rpm" -ta ${TAR_NAME} + +rm ${RPM_PACKAGE_NAME}.spec +rm ${TAR_NAME} +rm ${REAL_PACKAGE_NAME}.1 |