# Apt-P2P Clean # # Douglas Thrift # # $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 tarname := $(shell ./apt-p2p-clean -v | sed -e 's/ /-/g') prefix := /usr sbindir := ${prefix}/sbin man8dir := ${prefix}/share/man/man8 .PHONY: all clean dist install uninstall all: $(all) apt-p2p-clean.8: apt-p2p-clean.8.in %.8: % help2man -I $@.in -Nn '$(shell sed -e '$$ s/^# //p;d' $<)' -o $@ -s 8 $(shell realpath $<) clean: rm -f $(all) dist: $(all) bsdtar -cf $(tarname).tar.bz2 -js '#^\.#$(tarname)#' -v --exclude '*.tar.bz2' --exclude '.git*' . 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