First shot at adding packaging to clatd GIT repo.

The RPM should be able to be built by going into the packaging/rpm directory
and typing "make".
This commit is contained in:
David Summers
2015-12-17 23:10:27 -06:00
parent aa92cb0287
commit 106bae6d83
2 changed files with 80 additions and 0 deletions

26
packaging/rpm/Makefile Normal file
View File

@@ -0,0 +1,26 @@
# Build the clatd RPM package from the GIT packaging/rpm directory.
#
# This package should be able to be built from the GIT repo by typing
# make in the packaging/rpm directory.
#
# If this doesn't happen then that is a bug that needs to be reported.
# There may be better ways, of so, please educate me.
SPECFILE=clatd.el6.spec
NAME := $(shell grep '^Name: ' < $(SPECFILE) | sed -e 's;^Name: ;;')
VERSION := $(shell grep '^Version: ' < $(SPECFILE) | sed -e 's;^Version: ;;')
FILENAME=${NAME}-${VERSION}
TARNAME=${FILENAME}.tar.gz
TOPDIR=$(shell cd ../..; echo `pwd`)
DESTDIR=`pwd`
all :
cd ../../..; \
rm -rf ${FILENAME}; \
cp -r ${TOPDIR} ${FILENAME}; \
tar cfz ${TARNAME} ${FILENAME} --exclude=.git; \
rm -rf ${FILENAME}
mv ../../../${TARNAME} .
rpmbuild -ta ${TARNAME}
rm -rf ${TARNAME}