| 1 |
SUBDIRS= \ |
| 2 |
po \ |
| 3 |
profiles \ |
| 4 |
systemd \ |
| 5 |
src/common \ |
| 6 |
src/lib \ |
| 7 |
src/cli \ |
| 8 |
src/tests \ |
| 9 |
$(NULL) |
| 10 |
|
| 11 |
if HAVE_MANPAGES |
| 12 |
SUBDIRS += src/man |
| 13 |
endif |
| 14 |
|
| 15 |
# Documentation - for now just the license |
| 16 |
dist_doc_DATA = \ |
| 17 |
COPYING \ |
| 18 |
README.md \ |
| 19 |
$(NULL) |
| 20 |
|
| 21 |
ACLOCAL_AMFLAGS = -I m4 |
| 22 |
EXTRA_DIST = \ |
| 23 |
build/config.rpath \ |
| 24 |
scripts/auto \ |
| 25 |
scripts/commands/install-build-deps.sh \ |
| 26 |
scripts/commands/make-srpm.sh \ |
| 27 |
scripts/release-version.sh \ |
| 28 |
scripts/po-linguas.sh \ |
| 29 |
$(NULL) |
| 30 |
|
| 31 |
# Create authselect directories |
| 32 |
authselect_config_dir=@AUTHSELECT_CONFIG_DIR@ |
| 33 |
authselect_state_dir=@AUTHSELECT_STATE_DIR@ |
| 34 |
authselect_profile_dir=@AUTHSELECT_PROFILE_DIR@ |
| 35 |
authselect_custom_dir=@AUTHSELECT_CUSTOM_DIR@ |
| 36 |
authselect_dconf_dir=@AUTHSELECT_DCONF_DIR@ |
| 37 |
authselect_pam_dir=@AUTHSELECT_PAM_DIR@ |
| 38 |
authselect_backup_dir=@AUTHSELECT_BACKUP_DIR@ |
| 39 |
authselect_default_config_path=@AUTHSELECT_DEFAULT_CONFIG_PATH@ |
| 40 |
|
| 41 |
install-exec-hook: |
| 42 |
$(MKDIR_P) $(DESTDIR)$/$(authselect_config_dir) |
| 43 |
$(MKDIR_P) $(DESTDIR)$/$(authselect_state_dir) |
| 44 |
$(MKDIR_P) $(DESTDIR)$/$(authselect_profile_dir) |
| 45 |
$(MKDIR_P) $(DESTDIR)$/$(authselect_profile_dir)/vendor |
| 46 |
$(MKDIR_P) $(DESTDIR)$/$(authselect_custom_dir) |
| 47 |
$(MKDIR_P) $(DESTDIR)$/$(authselect_dconf_dir) |
| 48 |
$(MKDIR_P) $(DESTDIR)$/$(authselect_dconf_dir)/locks |
| 49 |
$(MKDIR_P) $(DESTDIR)$$(dirname $(authselect_default_config_path)) |
| 50 |
$(MKDIR_P) $(DESTDIR)$/$(authselect_pam_dir) |
| 51 |
$(MKDIR_P) $(DESTDIR)$/$(authselect_backup_dir) |
| 52 |
|
| 53 |
# Build RPMs |
| 54 |
RPMBUILD ?= $(PWD)/rpmbuild |
| 55 |
|
| 56 |
rpmroot: |
| 57 |
$(MKDIR_P) $(RPMBUILD)/BUILD |
| 58 |
$(MKDIR_P) $(RPMBUILD)/RPMS |
| 59 |
$(MKDIR_P) $(RPMBUILD)/SOURCES |
| 60 |
$(MKDIR_P) $(RPMBUILD)/SPECS |
| 61 |
$(MKDIR_P) $(RPMBUILD)/SRPMS |
| 62 |
|
| 63 |
rpmprep: dist-gzip rpmroot |
| 64 |
cp $(builddir)/rpm/authselect.spec $(RPMBUILD)/SPECS |
| 65 |
cp $(distdir).tar.gz $(RPMBUILD)/SOURCES |
| 66 |
cp $(srcdir)/rpm/authselect.conf.fedora $(RPMBUILD)/SOURCES |
| 67 |
cp $(srcdir)/rpm/authselect.conf.rhel $(RPMBUILD)/SOURCES |
| 68 |
|
| 69 |
rpms: rpmprep |
| 70 |
cd $(RPMBUILD); \ |
| 71 |
CFLAGS="$(CFLAGS) -fPIC" rpmbuild --define "_topdir $(RPMBUILD)" -ba SPECS/authselect.spec |
| 72 |
|
| 73 |
srpm: rpmprep |
| 74 |
cd $(RPMBUILD); \ |
| 75 |
rpmbuild --define "_topdir $(RPMBUILD)" -bs SPECS/authselect.spec |