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