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 | |
Tomas Cejka | c95271a | 2016-03-02 09:07:19 +0100 | [diff] [blame] | 12 | DISTCHECK_CONFIGURE_FLAGS="--without-systemd" |
| 13 | if HAVE_SYSTEMD |
| 14 | systemddir=@SYSTEMD_UNIT_DIR@ |
Tomas Cejka | 1c9a6c4 | 2016-03-14 09:29:33 -0400 | [diff] [blame] | 15 | systemd_DATA=netopeerguid.service |
Tomas Cejka | 18e505a | 2016-03-14 09:43:46 -0400 | [diff] [blame] | 16 | |
Tomas Cejka | 8c26376 | 2016-03-14 13:41:28 -0400 | [diff] [blame] | 17 | install-data-hook: |
Tomas Cejka | 18e505a | 2016-03-14 09:43:46 -0400 | [diff] [blame] | 18 | @systemctl enable netopeerguid |
| 19 | @systemctl --system daemon-reload 2>/dev/null|| true |
| 20 | @echo "Run as root: service netopeerguid start" |
| 21 | else |
Tomas Cejka | 8c26376 | 2016-03-14 13:41:28 -0400 | [diff] [blame] | 22 | install-data-hook: |
Tomas Cejka | 18e505a | 2016-03-14 09:43:46 -0400 | [diff] [blame] | 23 | @chkconfig --add netopeerguid.rc |
| 24 | @echo "Run as root: service netopeerguid.rc start" |
Tomas Cejka | c95271a | 2016-03-02 09:07:19 +0100 | [diff] [blame] | 25 | endif |
| 26 | |
Tomas Cejka | 50c076e | 2014-03-18 15:31:10 +0100 | [diff] [blame] | 27 | if MAKE_RPMS |
| 28 | |
| 29 | RPMFILENAME=$(PACKAGE_NAME)-$(VERSION) |
| 30 | .PHONY: rpm |
| 31 | rpm: |
| 32 | rm -rf "$(RPMDIR)/SOURCES/$(RPMFILENAME)" |
| 33 | mkdir -p $(RPMDIR)/BUILD/ $(RPMDIR)/SRPMS/ $(RPMDIR)/RPMS/ $(RPMDIR)/SOURCES |
| 34 | make ${AM_MAKEFLAGS} distdir='$(RPMDIR)/SOURCES/$(RPMFILENAME)' distdir |
Tomas Cejka | 50c076e | 2014-03-18 15:31:10 +0100 | [diff] [blame] | 35 | find "$(RPMDIR)" -name '*.back' -exec rm -f {} \; |
| 36 | ( cd "$(RPMDIR)/SOURCES/"; tar -z -c -f $(RPMFILENAME)-$(RELEASE).tar.gz $(RPMFILENAME); rm -rf $(RPMFILENAME); ) |
| 37 | $(RPMBUILD) -ba $(PACKAGE_NAME).spec --define "_topdir `pwd`/$(RPMDIR)"; |
| 38 | |
| 39 | rpm-clean: |
| 40 | rm -rf $(RPMDIR) |
| 41 | else |
| 42 | endif |