blob: f21594e7d2b359943d198ea25ffff165993266d1 [file] [log] [blame]
Tomas Cejka50c076e2014-03-18 15:31:10 +01001ACLOCAL_AMFLAGS = -I m4
2
3
4SUBDIRS=src
Michal Vaskoc3146782015-11-04 14:46:41 +01005DIST_SUBDIRS=src
Tomas Cejka50c076e2014-03-18 15:31:10 +01006
7RPMDIR = RPMBUILD
8
9dist-hook:
10 find "$(distdir)" -name .gitignore -exec rm {} \;
11
Tomas Cejkac95271a2016-03-02 09:07:19 +010012DISTCHECK_CONFIGURE_FLAGS="--without-systemd"
13if HAVE_SYSTEMD
14systemddir=@SYSTEMD_UNIT_DIR@
Tomas Cejka1c9a6c42016-03-14 09:29:33 -040015systemd_DATA=netopeerguid.service
Tomas Cejka18e505a2016-03-14 09:43:46 -040016
Tomas Cejka8c263762016-03-14 13:41:28 -040017install-data-hook:
Tomas Cejka18e505a2016-03-14 09:43:46 -040018 @systemctl enable netopeerguid
19 @systemctl --system daemon-reload 2>/dev/null|| true
20 @echo "Run as root: service netopeerguid start"
21else
Tomas Cejka8c263762016-03-14 13:41:28 -040022install-data-hook:
Tomas Cejka18e505a2016-03-14 09:43:46 -040023 @chkconfig --add netopeerguid.rc
24 @echo "Run as root: service netopeerguid.rc start"
Tomas Cejkac95271a2016-03-02 09:07:19 +010025endif
26
Tomas Cejka50c076e2014-03-18 15:31:10 +010027if MAKE_RPMS
28
29RPMFILENAME=$(PACKAGE_NAME)-$(VERSION)
30.PHONY: rpm
31rpm:
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 Cejka50c076e2014-03-18 15:31:10 +010035 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
39rpm-clean:
40 rm -rf $(RPMDIR)
41else
42endif