2006-04-12 19:31:08 +00:00
|
|
|
# $Id$
|
2006-04-11 21:52:54 +00:00
|
|
|
# ----------------------------------------------------------------------
|
2010-02-12 10:14:11 -06:00
|
|
|
# Copyright (c) 1999, 2004-2009 NOVELL (All rights reserved)
|
|
|
|
# Copyright (c) 2010 Canonical Ltd.
|
2006-04-11 21:52:54 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
|
|
# License published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, contact Novell, Inc.
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
NAME = apparmor-utils
|
|
|
|
all:
|
2006-04-12 19:31:08 +00:00
|
|
|
COMMONDIR=../common/
|
2006-04-11 21:52:54 +00:00
|
|
|
|
2006-11-04 21:34:47 +00:00
|
|
|
include common/Make.rules
|
2006-04-11 21:52:54 +00:00
|
|
|
|
|
|
|
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
|
|
|
|
ifeq ($(COMMONDIR_EXISTS), true)
|
2006-11-04 21:34:47 +00:00
|
|
|
common/Make.rules: $(COMMONDIR)/Make.rules
|
|
|
|
ln -sf $(COMMONDIR) .
|
2006-04-11 21:52:54 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
TOOLS = genprof logprof autodep audit complain enforce \
|
2010-02-12 10:14:11 -06:00
|
|
|
unconfined aa-eventd apparmor_status aa-decode \
|
|
|
|
apparmor_notify
|
2006-04-11 21:52:54 +00:00
|
|
|
|
2007-08-15 21:43:40 +00:00
|
|
|
AA_MANPAGES = autodep.8 complain.8 enforce.8 logprof.8 genprof.8 unconfined.8 audit.8
|
2010-02-12 10:14:11 -06:00
|
|
|
MANPAGES = ${AA_MANPAGES} logprof.conf.5 apparmor_status.8 aa-decode.8 apparmor_notify.8
|
2007-04-03 19:13:35 +00:00
|
|
|
|
|
|
|
all: ${MANPAGES} ${HTMLMANPAGES}
|
2006-11-15 09:22:15 +00:00
|
|
|
make -C po all
|
|
|
|
|
2006-04-11 21:52:54 +00:00
|
|
|
# need some better way of determining this
|
|
|
|
DESTDIR=/
|
|
|
|
BINDIR=${DESTDIR}/usr/sbin
|
|
|
|
CONFDIR=${DESTDIR}/etc/apparmor
|
2011-02-08 10:35:10 -08:00
|
|
|
VENDOR_PERL?=/usr/lib/perl5/vendor_perl
|
|
|
|
PERLDIR=${DESTDIR}${VENDOR_PERL}/Immunix
|
2006-04-11 21:52:54 +00:00
|
|
|
|
|
|
|
po/${NAME}.pot: ${TOOLS}
|
2008-02-26 12:00:37 +00:00
|
|
|
make -C po ${NAME}.pot NAME=${NAME} SOURCES="${TOOLS} SubDomain.pm Repository.pm Config.pm Reports.pm"
|
2006-04-11 21:52:54 +00:00
|
|
|
|
|
|
|
.PHONY: install
|
2007-04-03 19:13:35 +00:00
|
|
|
install: ${MANPAGES} ${HTMLMANPAGES}
|
2006-04-11 21:52:54 +00:00
|
|
|
install -d ${CONFDIR}
|
2010-02-12 10:14:11 -06:00
|
|
|
install -m 644 logprof.conf severity.db notify.conf ${CONFDIR}
|
2006-04-11 21:52:54 +00:00
|
|
|
install -d ${BINDIR}
|
|
|
|
ln -sf apparmor_status ${BINDIR}/aa-status
|
|
|
|
ln -sf audit ${BINDIR}/aa-audit
|
|
|
|
ln -sf autodep ${BINDIR}/aa-autodep
|
|
|
|
ln -sf complain ${BINDIR}/aa-complain
|
|
|
|
ln -sf enforce ${BINDIR}/aa-enforce
|
|
|
|
ln -sf genprof ${BINDIR}/aa-genprof
|
|
|
|
ln -sf logprof ${BINDIR}/aa-logprof
|
|
|
|
ln -sf unconfined ${BINDIR}/aa-unconfined
|
2010-02-12 10:14:11 -06:00
|
|
|
ln -sf apparmor_notify ${BINDIR}/aa-notify
|
2006-04-11 21:52:54 +00:00
|
|
|
install -m 755 ${TOOLS} ${BINDIR}
|
|
|
|
install -d ${PERLDIR}
|
2008-02-26 12:00:37 +00:00
|
|
|
install -m 755 SubDomain.pm Repository.pm Config.pm Reports.pm Severity.pm ${PERLDIR}
|
2006-04-11 21:52:54 +00:00
|
|
|
make -C po install DESTDIR=${DESTDIR} NAME=${NAME}
|
|
|
|
mkdir -m 0700 -p $(DESTDIR)/var/log/apparmor
|
2007-04-03 19:13:35 +00:00
|
|
|
make install_manpages DESTDIR=${DESTDIR}
|
|
|
|
# special case for apparmor_status
|
|
|
|
ln -sf apparmor_status.8 ${DESTDIR}/${MANDIR}/man8/aa-status.8
|
2010-02-12 10:14:11 -06:00
|
|
|
ln -sf apparmor_notify.8 ${DESTDIR}/${MANDIR}/man8/aa-notify.8
|
|
|
|
|
2006-04-11 21:52:54 +00:00
|
|
|
.PHONY: clean
|
2007-04-03 20:12:16 +00:00
|
|
|
.SILENT: clean
|
|
|
|
clean: _clean
|
2006-11-04 21:34:47 +00:00
|
|
|
rm -f core core.* *.o *.s *.a *~
|
2007-04-03 20:12:16 +00:00
|
|
|
rm -f Make.rules
|
2006-04-11 21:52:54 +00:00
|
|
|
make -C po clean
|
|
|
|
|