debian-forge/Makefile
Martin Sehnoutka 3c19420b3e introduce spec file and related build scripts
The repository now contains a Vagrantfile for running the testing script
against an RPM package created locally using `make rpm`. To run this
test use `make vagrant-test`. setup.py was also modified to adhere to
packaging guidelines and not to install system-level executables.
The lincense is now included in the Python package using the MANIFEST.in
file.
2019-07-23 15:22:40 +02:00

39 lines
1 KiB
Makefile

PACKAGE_NAME=osbuild
VERSION=1
sdist:
python3 setup.py sdist
find `pwd`/dist -name '*.tar.gz' -printf '%f\n' -exec mv {} . \;
tarball:
git archive --prefix=osbuild-$(VERSION)/ --format=tar.gz HEAD > $(VERSION).tar.gz
srpm: $(PACKAGE_NAME).spec tarball
/usr/bin/rpmbuild -bs \
--define "_sourcedir $(CURDIR)" \
--define "_srcrpmdir $(CURDIR)" \
$(PACKAGE_NAME).spec
rpm: $(PACKAGE_NAME).spec tarball
mkdir -p "`pwd`/output"
mkdir -p "`pwd`/rpmbuild"
/usr/bin/rpmbuild -bb \
--define "_sourcedir `pwd`" \
--define "_specdir `pwd`" \
--define "_builddir `pwd`/rpmbuild" \
--define "_srcrpmdir `pwd`" \
--define "_rpmdir `pwd`/output" \
--define "_buildrootdir `pwd`/build" \
$(PACKAGE_NAME).spec
find `pwd`/output -name '*.rpm' -printf '%f\n' -exec mv {} . \;
rm -r "`pwd`/rpmbuild"
rm -r "`pwd`/output"
rm -r "`pwd`/build"
copy-rpms-to-test:
cp *.rpm test/
vagrant-test: rpm copy-rpms-to-test
- $(MAKE) -C test up
- $(MAKE) -C test install-deps
$(MAKE) -C test run-tests-remotely