Tomas Cejka | 50c076e | 2014-03-18 15:31:10 +0100 | [diff] [blame] | 1 | ACLOCAL_AMFLAGS = -I m4 |
| 2 | |
| 3 | |
| 4 | SUBDIRS=src |
Michal Vasko | c314678 | 2015-11-04 14:46:41 +0100 | [diff] [blame] | 5 | DIST_SUBDIRS=src |
Tomas Cejka | 50c076e | 2014-03-18 15:31:10 +0100 | [diff] [blame] | 6 | |
| 7 | RPMDIR = RPMBUILD |
| 8 | |
| 9 | dist-hook: |
| 10 | find "$(distdir)" -name .gitignore -exec rm {} \; |
| 11 | |
| 12 | if MAKE_RPMS |
| 13 | |
| 14 | RPMFILENAME=$(PACKAGE_NAME)-$(VERSION) |
| 15 | .PHONY: rpm |
| 16 | rpm: |
| 17 | rm -rf "$(RPMDIR)/SOURCES/$(RPMFILENAME)" |
| 18 | mkdir -p $(RPMDIR)/BUILD/ $(RPMDIR)/SRPMS/ $(RPMDIR)/RPMS/ $(RPMDIR)/SOURCES |
| 19 | make ${AM_MAKEFLAGS} distdir='$(RPMDIR)/SOURCES/$(RPMFILENAME)' distdir |
Tomas Cejka | 50c076e | 2014-03-18 15:31:10 +0100 | [diff] [blame] | 20 | find "$(RPMDIR)" -name '*.back' -exec rm -f {} \; |
| 21 | ( cd "$(RPMDIR)/SOURCES/"; tar -z -c -f $(RPMFILENAME)-$(RELEASE).tar.gz $(RPMFILENAME); rm -rf $(RPMFILENAME); ) |
| 22 | $(RPMBUILD) -ba $(PACKAGE_NAME).spec --define "_topdir `pwd`/$(RPMDIR)"; |
| 23 | |
| 24 | rpm-clean: |
| 25 | rm -rf $(RPMDIR) |
| 26 | else |
| 27 | endif |