debian-cis/debian/rules
2016-04-20 18:06:08 +02:00

37 lines
1.3 KiB
Makefile
Executable File

#!/usr/bin/make -f
# -*- makefile -*-
# vim: set noexpandtab:
#
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
PACKAGE = $(shell dh_listpackages)
%:
dh $@
override_dh_install:
dh_install
mkdir -p $(CURDIR)/debian/$(PACKAGE)/opt/$(PACKAGE)/
cp README $(CURDIR)/debian/$(PACKAGE)/opt/$(PACKAGE)/
cp -R bin $(CURDIR)/debian/$(PACKAGE)/opt/$(PACKAGE)/
# /!\ tag /opt/$(PACKAGE)/etc/conf.d/* as configuration files in conffiles
# (ls | sort -V | xargs -i echo opt/cis-hardening/etc/conf.d/{} -- without README)
cp -R etc $(CURDIR)/debian/$(PACKAGE)/opt/$(PACKAGE)/
cp -R lib $(CURDIR)/debian/$(PACKAGE)/opt/$(PACKAGE)/
# cleanup git stuff if any
find $(CURDIR)/debian/$(PACKAGE) -type f -name .gitignore -delete
override_dh_installdocs:
dh_installdocs
gzip -c LICENSE > $(CURDIR)/debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/LICENSE.gz
gzip -c README > $(CURDIR)/debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/README.gz
gzip -c src/skel > $(CURDIR)/debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/skel.gz