| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
# This file is part of netfilter-persistent |
| 4 |
# Copyright (C) 2014 Jonathan Wiltshire |
| 5 |
# |
| 6 |
# This program is free software; you can redistribute it and/or |
| 7 |
# modify it under the terms of the GNU General Public License |
| 8 |
# as published by the Free Software Foundation, either version 3 |
| 9 |
# of the License, or (at your option) any later version. |
| 10 |
|
| 11 |
PREFIX=/ |
| 12 |
DEST=$(DESTDIR)$(PREFIX) |
| 13 |
|
| 14 |
all: |
| 15 |
|
| 16 |
clean: |
| 17 |
|
| 18 |
install: |
| 19 |
install -d $(DEST)/usr/sbin |
| 20 |
install -d $(DEST)/usr/share/netfilter-persistent |
| 21 |
install -d $(DEST)/usr/share/netfilter-persistent/plugins.d |
| 22 |
# Main wrapper |
| 23 |
install netfilter-persistent $(DEST)/usr/sbin |
| 24 |
# Systemd |
| 25 |
install -d $(DEST)/usr/lib/systemd/system |
| 26 |
install --mode=644 systemd/* $(DEST)/usr/lib/systemd/system |
| 27 |
# Manual |
| 28 |
install -d $(DEST)/usr/share/man/man8 |
| 29 |
install --mode=644 netfilter-persistent.8 $(DEST)/usr/share/man/man8 |
| 30 |
|
| 31 |
install-plugins: |
| 32 |
# Plugins |
| 33 |
install plugins/* $(DEST)/usr/share/netfilter-persistent/plugins.d |
| 34 |
# Explicit flush plugin |
| 35 |
install --mode=755 iptb-expflush-plugin $(DEST)/usr/share/netfilter-persistent |
| 36 |
ln -fs /usr/share/netfilter-persistent/iptb-expflush-plugin $(DEST)/usr/share/netfilter-persistent/plugins/12-iptb4-explicit-flush |
| 37 |
ln -fs /usr/share/netfilter-persistent/iptb-expflush-plugin $(DEST)/usr/share/netfilter-persistent/plugins/20-iptb6-explicit-flush |