summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChristophe Vu-Brugier <cvubrugier@fastmail.fm>2016-10-21 11:08:28 +0200
committerChristophe Vu-Brugier <cvubrugier@fastmail.fm>2016-10-24 20:19:49 +0200
commitf2758a19c522b086ee51597266626f35ebc555fc (patch)
tree95a14d34ebc9e305d7f3d252d0061da728488090 /Makefile
parent8feb09b67f6e87ee4920216ab8e647f8758d689e (diff)
downloadconfigshell-fb-f2758a19c522b086ee51597266626f35ebc555fc.tar.gz
Remove build scripts for RPM and Debian packages
Remove the "debian" directory because Debian packagers have reported in the past that having a "debian" directory makes their work harder when merging the upstream branch into their packaging branch. Moreover, our in-repo Debian packaging is less complete than the Debian packaging. Also remove our in-repo RPM packaging which is probably lagging behind Fedora's packaging. Finally, this patch adds a few links to RPM and Debian build scripts in our README.md. Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile69
1 files changed, 0 insertions, 69 deletions
diff --git a/Makefile b/Makefile
index cda0e5e..a91fdc8 100644
--- a/Makefile
+++ b/Makefile
@@ -6,8 +6,6 @@ VERSION = $$(basename $$(git describe --tags | tr - . | sed 's/^v//'))
all:
@echo "Usage:"
@echo
- @echo " make deb - Builds debian packages."
- @echo " make rpm - Builds rpm packages."
@echo " make release - Generates the release tarball."
@echo
@echo " make clean - Cleanup the local repository build files."
@@ -17,15 +15,7 @@ clean:
@rm -fv ${NAME}/*.pyc ${NAME}/*.html
@rm -frv doc
@rm -frv ${NAME}.egg-info MANIFEST build
- @rm -frv debian/tmp
- @rm -fv build-stamp
- @rm -fv dpkg-buildpackage.log dpkg-buildpackage.version
- @rm -frv *.rpm
- @rm -fv debian/files debian/*.log debian/*.substvars
- @rm -frv debian/${PKGNAME}-doc/ debian/python2.5-${PKGNAME}/
- @rm -frv debian/python2.6-${PKGNAME}/ debian/python-${PKGNAME}/
@rm -frv results
- @rm -fv rpm/*.spec *.spec rpm/sed* sed*
@rm -frv ${PKGNAME}-*
@echo "Finished cleanup."
@@ -44,41 +34,6 @@ build/release-stamp:
@echo "Fixing version string..."
@sed -i "s/__version__ = .*/__version__ = '${VERSION}'/g" \
build/${PKGNAME}-${VERSION}/${NAME}/__init__.py
- @echo "Generating rpm specfile from template..."
- @cd build/${PKGNAME}-${VERSION}; \
- for spectmpl in rpm/*.spec.tmpl; do \
- sed -i "s/Version:\( *\).*/Version:\1${VERSION}/g" $${spectmpl}; \
- mv $${spectmpl} $$(basename $${spectmpl} .tmpl); \
- done; \
- rm -r rpm
- @echo "Generating rpm changelog..."
- @( \
- version=${VERSION}; \
- author=$$(git show HEAD --format="format:%an <%ae>" -s); \
- date=$$(git show HEAD --format="format:%ad" -s \
- | awk '{print $$1,$$2,$$3,$$5}'); \
- hash=$$(git show HEAD --format="format:%H" -s); \
- echo '* '"$${date} $${author} $${version}-1"; \
- echo " - Generated from git commit $${hash}."; \
- ) >> $$(ls build/${PKGNAME}-${VERSION}/*.spec)
- @echo "Generating debian changelog..."
- @( \
- version=${VERSION}; \
- author=$$(git show HEAD --format="format:%an <%ae>" -s); \
- date=$$(git show HEAD --format="format:%aD" -s); \
- day=$$(git show HEAD --format='format:%ai' -s \
- | awk '{print $$1}' \
- | awk -F '-' '{print $$3}' | sed 's/^0/ /g'); \
- date=$$(echo $${date} \
- | awk '{print $$1, "'"$${day}"'", $$3, $$4, $$5, $$6}'); \
- hash=$$(git show HEAD --format="format:%H" -s); \
- echo "${PKGNAME} ($${version}) unstable; urgency=low"; \
- echo; \
- echo " * Generated from git commit $${hash}."; \
- echo; \
- echo " -- $${author} $${date}"; \
- echo; \
- ) > build/${PKGNAME}-${VERSION}/debian/changelog
@find build/${PKGNAME}-${VERSION}/ -exec \
touch -t $$(date -d @$$(git show -s --format="format:%at") \
+"%Y%m%d%H%M.%S") {} \;
@@ -92,27 +47,3 @@ build/release-stamp:
@echo "Generated release tarball:"
@echo " $$(ls dist/${PKGNAME}-${VERSION}.tar.gz)"
@touch build/release-stamp
-
-deb: release build/deb-stamp
-build/deb-stamp:
- @echo "Building debian packages..."
- @cd build/${PKGNAME}-${VERSION}; \
- dpkg-buildpackage -rfakeroot -us -uc
- @mv build/*_${VERSION}_*.deb dist/
- @echo "Generated debian packages:"
- @for pkg in $$(ls dist/*_${VERSION}_*.deb); do echo " $${pkg}"; done
- @touch build/deb-stamp
-
-rpm: release build/rpm-stamp
-build/rpm-stamp:
- @echo "Building rpm packages..."
- @mkdir -p build/rpm
- @build=$$(pwd)/build/rpm; dist=$$(pwd)/dist/; rpmbuild \
- --define "_topdir $${build}" --define "_sourcedir $${dist}" \
- --define "_rpmdir $${build}" --define "_buildir $${build}" \
- --define "_srcrpmdir $${build}" -ba build/${PKGNAME}-${VERSION}/*.spec
- @mv build/rpm/*-${VERSION}*.src.rpm dist/
- @mv build/rpm/*/*-${VERSION}*.rpm dist/
- @echo "Generated rpm packages:"
- @for pkg in $$(ls dist/*-${VERSION}*.rpm); do echo " $${pkg}"; done
- @touch build/rpm-stamp