stunnel4/debian/rules

80 lines
2.1 KiB
Plaintext
Raw Normal View History

2013-04-22 19:47:34 +02:00
#!/usr/bin/make -f
2017-09-23 15:25:21 +02:00
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# debian/rules file for the Debian GNU/Linux stunnel package
2013-04-22 19:47:34 +02:00
# Copyright 2003 by Julien LEMOINE <speedblue@debian.org>
2017-09-23 15:25:21 +02:00
# Copyright 2014 by Peter Pentchev <roam@ringlet.net>
2013-04-22 19:47:34 +02:00
2017-09-23 15:25:21 +02:00
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
DEB_NODOC=0
2013-04-22 19:47:34 +02:00
else
2017-09-23 15:25:21 +02:00
DEB_NODOC=1
2013-04-22 19:47:34 +02:00
endif
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND=-Wall
2017-09-23 15:25:21 +02:00
multiarch_path= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
2013-04-22 19:47:34 +02:00
2017-09-23 15:25:21 +02:00
override_dh_auto_configure:
dh_auto_configure -- \
2013-04-22 19:47:34 +02:00
--enable-ipv6 --with-threads=pthread
2017-09-23 15:25:21 +02:00
override_dh_auto_install:
dh_auto_install -- -C src
ifeq ($(DEB_NODOC),0)
dh_auto_install -- -C doc
endif
2013-04-22 19:47:34 +02:00
2017-09-23 15:25:21 +02:00
# .la file is useless
rm $(CURDIR)/debian/stunnel4/usr/lib/$(multiarch_path)/stunnel/libstunnel.la
2013-04-22 19:47:34 +02:00
2017-09-23 15:25:21 +02:00
# Rename binary
mv $(CURDIR)/debian/stunnel4/usr/bin/stunnel \
$(CURDIR)/debian/stunnel4/usr/bin/stunnel4
2013-04-22 19:47:34 +02:00
2017-09-23 15:25:21 +02:00
# Copy sample init script into place for dh_installinit
cp $(CURDIR)/tools/stunnel.init $(CURDIR)/debian/stunnel4.init
2013-04-22 19:47:34 +02:00
2017-09-23 15:25:21 +02:00
ifeq ($(DEB_NODOC),0)
2013-04-22 19:47:34 +02:00
ln doc/stunnel.8 doc/stunnel4.8
ln doc/stunnel.pl.8 doc/stunnel4.pl.8
# Manpages will be installed by dh_installman
rm -rf $(CURDIR)/debian/stunnel4/usr/share/man
2017-09-23 15:25:21 +02:00
# Move docs into proper dir
2013-04-22 19:47:34 +02:00
mv $(CURDIR)/debian/stunnel4/usr/share/doc/stunnel \
$(CURDIR)/debian/stunnel4/usr/share/doc/stunnel4
# Basic docs for the user on how to create an initial configuration
install -p -m 0644 $(CURDIR)/debian/stunnel4.conf.README \
$(CURDIR)/debian/stunnel4/etc/stunnel/README
2017-09-23 15:25:21 +02:00
endif
ifeq ($(DEB_NODOC),1)
override_dh_installdocs:
mkdir -p $(CURDIR)/debian/stunnel4/usr/share/doc/stunnel4
install -c -o root -g root -m 644 $(CURDIR)/debian/copyright $(CURDIR)/debian/stunnel4/usr/share/doc/stunnel4/
override_dh_installman:
override_dh_link:
dh_link
rm $(CURDIR)/debian/stunnel4/usr/share/man/man8/stunnel.8.gz
rmdir $(CURDIR)/debian/stunnel4/usr/share/man/man8
rmdir $(CURDIR)/debian/stunnel4/usr/share/man
endif
override_dh_installppp:
dh_installppp --name=0stunnel4
override_dh_compress:
dh_compress --exclude=StunnelConf-0.1.pl
2013-04-22 19:47:34 +02:00
2017-09-23 15:25:21 +02:00
%:
dh $@