git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@1108 0109f412-320b-0410-ab79-c3e0c5ffbbe6
27 lines
623 B
Makefile
27 lines
623 B
Makefile
rpmspec = $(PACKAGE_TARNAME).spec
|
|
|
|
rpmmacros =\
|
|
--define="_rpmdir $${PWD}"\
|
|
--define="_srcrpmdir $${PWD}"\
|
|
--define="_sourcedir $${PWD}/.."\
|
|
--define="_specdir $${PWD}"\
|
|
--define="_builddir $${PWD}"
|
|
|
|
RPMBUILD = rpmbuild
|
|
RPMFLAGS = --nodeps --buildroot="$${PWD}/_rpm"
|
|
|
|
rpmcheck:
|
|
if [ which rpmbuild &> /dev/null ]; then \
|
|
echo "*** This make target requires an rpm-based linux distribution."; \
|
|
(exit 1); exit 1; \
|
|
fi
|
|
|
|
srcrpm: rpmcheck $(rpmspec)
|
|
$(RPMBUILD) $(RPMFLAGS) -bs $(rpmmacros) $(rpmspec)
|
|
|
|
rpms: rpmcheck $(rpmspec)
|
|
$(RPMBUILD) $(RPMFLAGS) -ba $(rpmmacros) $(rpmspec)
|
|
|
|
.PHONY: rpmcheck srcrpm rpms
|
|
|