"Fossies" - the Fresh Open Source Software Archive

Member "fou4s-0.16.0/Makefile" (22 Mar 2009, 2227 Bytes) of package /linux/privat/old/fou4s-0.16.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Makefile for installation of fou4s. 
    2 # Copyright (c) 2002-2005 Markus Gaugusch <fou4s@gaugusch.at>
    3 DESTDIR= # this variable is overwritten to install in RPMBUILDDESTDIR
    4 PREFIX=$(DESTDIR)/usr
    5 ETC=$(DESTDIR)/etc
    6 VAR=$(DESTDIR)/var
    7 DOCDIR=$(DESTDIR)/usr/share/doc/packages/fou4s
    8 
    9 # a hook to allow non-root installs
   10 ROOT=1
   11 
   12 CHGRP=chgrp
   13 
   14 ifeq ($(ROOT),1)
   15   INSTALL_GROUP=-g fou4s
   16 else
   17   # now won't this surprise the users?
   18   CHGRP=echo not root thus not running chgrp
   19 endif
   20 all:
   21 	@echo "Nothing to compile, this is a shellscript only. Use make install"
   22 
   23 install:
   24 ifeq ($(ROOT),1)
   25 	@if [ "`cat /etc/group | grep ^fou4s`" = "" ] ; then \
   26 		@echo Adding group fou4s ... ;\
   27 		groupadd fou4s ;\
   28 		passwd -g fou4s -r ;\
   29 	fi
   30 endif
   31 
   32 	@echo "Installing in $(PREFIX) ..."
   33 	mkdir -p $(ETC)/cron.d
   34 	mkdir -p $(PREFIX)/sbin
   35 	mkdir -p $(PREFIX)/bin
   36 	mkdir -p $(PREFIX)/lib/fou4s
   37 	mkdir -p $(VAR)/cache/fou4s/packages
   38 	mkdir -p $(VAR)/log
   39 	mkdir -p $(PREFIX)/share/man/man1
   40 	mkdir -p $(PREFIX)/share/man/man5
   41 	mkdir -p $(DOCDIR)
   42 	mkdir -p $(ETC)/logrotate.d
   43 	$(CHGRP) fou4s $(VAR)/cache/fou4s
   44 	chmod g+w $(VAR)/cache/fou4s
   45 	install fou4s-benchmark $(PREFIX)/bin
   46 	install gpd.sh $(PREFIX)/bin
   47 	install xmlp.awk $(PREFIX)/bin
   48 	install SuSE-release $(PREFIX)/bin
   49 	install get_info_from_ARCHIVES.pl $(PREFIX)/bin
   50 	install fou4s $(PREFIX)/sbin
   51 	install announcement2pkgdesc $(PREFIX)/bin
   52 	install -m 644 pkgdesc_template $(PREFIX)/lib/fou4s/pkgdesc_template
   53 	install -m 640 $(INSTALL_GROUP) fou4s.conf-example $(ETC)/fou4s.conf
   54 	install -m 644 FAQ KNOWN-BUGS README LICENSE Networking-Infos $(DOCDIR)
   55 	install -m 644 fou4s_public.gpg $(DOCDIR)
   56 	install -m 644 fou4s.1 $(PREFIX)/share/man/man1
   57 	install -m 644 fou4s.conf.5 $(PREFIX)/share/man/man5
   58 	install -m 644 logrotate $(ETC)/logrotate.d/fou4s
   59 	install -m 644 fou4s-cleanup $(ETC)/cron.d
   60 
   61 uninstall:
   62 	@echo "Removing fou4s from $(PREFIX) ..."
   63 	rm $(PREFIX)/bin/fou4s-benchmark
   64 	rm $(PREFIX)/bin/gpd.sh
   65 	rm $(PREFIX)/bin/get_info_from_ARCHIVES.pl
   66 	rm $(PREFIX)/bin/SuSE-release
   67 	rm $(PREFIX)/sbin/fou4s
   68 	rm $(PREFIX)/share/man/man1/fou4s.1
   69 	rm $(PREFIX)/share/man/man5/fou4s.conf.5
   70 	rm -rf $(PREFIX)/lib/fou4s
   71 	rm -rf $(DOCDIR)
   72 	rm -rf $(DESTDIR)/var/cache/fou4s
   73 	rm $(DESTDIR)/etc/fou4s.conf
   74