|
@@ -4,14 +4,42 @@
|
|
|
#
|
|
|
# $Id$
|
|
|
|
|
|
+# Copyright 2010 Douglas Thrift
|
|
|
+#
|
|
|
+# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
+# you may not use this file except in compliance with the License.
|
|
|
+# You may obtain a copy of the License at
|
|
|
+#
|
|
|
+# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
+#
|
|
|
+# Unless required by applicable law or agreed to in writing, software
|
|
|
+# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
+# See the License for the specific language governing permissions and
|
|
|
+# limitations under the License.
|
|
|
+
|
|
|
all := apt-p2p-clean.8
|
|
|
+prefix := /usr
|
|
|
+sbindir := ${prefix}/sbin
|
|
|
+man8dir := ${prefix}/share/man/man8
|
|
|
|
|
|
-.PHONY: all clean
|
|
|
+.PHONY: all clean install uninstall
|
|
|
|
|
|
all: $(all)
|
|
|
|
|
|
+apt-p2p-clean.8: apt-p2p-clean.8.in
|
|
|
+
|
|
|
%.8: % GNUmakefile
|
|
|
- help2man -Nn '$(shell sed -e '$$ s/^# //p;d' $<)' -o $@ -s 8 $(shell realpath $<)
|
|
|
+ help2man -I $@.in -Nn '$(shell sed -e '$$ s/^# //p;d' $<)' -o $@ -s 8 $(shell realpath $<)
|
|
|
|
|
|
clean:
|
|
|
rm -f $(all)
|
|
|
+
|
|
|
+install: $(all)
|
|
|
+ install -cdv $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
|
|
|
+ install -cv apt-p2p-clean $(DESTDIR)$(sbindir)/apt-p2p-clean
|
|
|
+ install -cm 644 -v apt-p2p-clean.8 $(DESTDIR)$(man8dir)/apt-p2p-clean.8
|
|
|
+
|
|
|
+uninstall:
|
|
|
+ rm -fv $(DESTDIR)$(sbindir)/apt-p2p-clean
|
|
|
+ rm -fv $(DESTDIR)$(man8dir)/apt-p2p-clean.8
|