summaryrefslogtreecommitdiff
path: root/modules/pam_namespace/Makefile.am
blob: dc7189f8e132b801c04a57e4871521b370d0400f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# Copyright (c) 2009 Thorsten Kukuk <kukuk@thkukuk.de>
# Copyright (c) 2006 Red Hat, Inc.
#

CLEANFILES = *~
MAINTAINERCLEANFILES = $(MAN5) $(MAN8) README

if HAVE_DOC
MAN5 = namespace.conf.5
MAN8 = pam_namespace.8 pam_namespace_helper.8
endif

EXTRA_DIST = README namespace.conf namespace.init $(MAN5) $(MAN8) $(XMLS) tst-pam_namespace

if HAVE_UNSHARE
  TESTS = tst-pam_namespace
  man_MANS = $(MAN5) $(MAN8)
endif

XMLS = README.xml namespace.conf.5.xml pam_namespace.8.xml pam_namespace_helper.8.xml

securelibdir = $(SECUREDIR)
secureconfdir = $(SCONFIGDIR)
namespaceddir = $(SCONFIGDIR)/namespace.d
servicedir = $(prefix)/lib/systemd

AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
        -DSECURECONF_DIR=\"$(SCONFIGDIR)/\" $(WARN_CFLAGS)
AM_LDFLAGS =  -no-undefined -avoid-version -module
if HAVE_VERSIONING
  AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map
endif

noinst_HEADERS = md5.h pam_namespace.h argv_parse.h

if HAVE_UNSHARE
  securelib_LTLIBRARIES = pam_namespace.la
  pam_namespace_la_SOURCES = pam_namespace.c md5.c argv_parse.c
  pam_namespace_la_LIBADD = $(top_builddir)/libpam/libpam.la @LIBSELINUX@

  secureconf_DATA = namespace.conf
  secureconf_SCRIPTS = namespace.init

install-data-local:
	mkdir -p $(DESTDIR)$(namespaceddir)
	mkdir -p $(DESTDIR)$(servicedir)
	$(INSTALL_DATA) pam_namespace.service $(DESTDIR)$(servicedir)

  sbin_SCRIPTS = pam_namespace_helper

uninstall-local:
	-rm $(DESTDIR)$(servicedir)/pam_namespace.service
endif


if ENABLE_REGENERATE_MAN
noinst_DATA = README
README: pam_namespace.8.xml namespace.conf.5.xml pam_namespace_helper.8.xml
-include $(top_srcdir)/Make.xml.rules
endif