1 # $Id: Makefile,v 1.3 2002/08/16 17:22:26 essmann Exp $
3 # Copyright (c) 2001 Bruno Essmann <essmann@users.sourceforge.net>
8 INSTALLDIR
= /usr
/local
13 @echo
"*** `pwd`: $@" ; \
18 @echo
"*** `pwd`: $@" ; \
23 echo
"*** `pwd`: $@" ; \
24 if
[ ! -f src
/wmpager
] ; then \
27 if
[ -z
"`id | grep 'uid=.*(root)'`" ] ; then \
28 echo
"you must be root to install wmpager!" ; \
31 for i in bin
/wmpager man
/man1
/wmpager
.1x
; do \
32 if
[ -f
${INSTALLDIR}/$$i ] ; then \
33 echo
"there's already a $$i in ${INSTALLDIR}" ; \
34 echo
"installation aborted." ; \
38 if
[ ! -d
${INSTALLDIR}/bin
] ; then \
39 mkdir
-p
${INSTALLDIR}/bin
; \
41 echo
"copying wmpager to ${INSTALLDIR}/bin" ; \
42 cp src
/wmpager
${INSTALLDIR}/bin
/wmpager
; \
43 chmod
755 ${INSTALLDIR}/bin
/wmpager
; \
44 if
[ ! -d
${INSTALLDIR}/man
/man1
] ; then \
45 mkdir
-p
${INSTALLDIR}/man
/man1
] ; \
47 echo
"copying manual page to ${INSTALLDIR}/man/man1" ; \
48 cp man
/man1
/wmpager
.1x
${INSTALLDIR}/man
/man1
/wmpager
.1x
; \
49 chmod
644 ${INSTALLDIR}/man
/man1
/wmpager
.1x
; \
50 echo
"copying theme files to ${INSTALLDIR}/share/wmpager" ; \
51 if
[ ! -d
${INSTALLDIR}/share
/wmpager
] ; then \
52 mkdir
-p
${INSTALLDIR}/share
/wmpager
; \
54 cp src
/buttons.xpm
${INSTALLDIR}/share
/wmpager
/blue.xpm
; \
55 cp themes
/*.xpm
${INSTALLDIR}/share
/wmpager
; \
56 chmod
644 ${INSTALLDIR}/share
/wmpager
/* ; \
57 echo
"installation complete, make sure your have ${INSTALLDIR}/bin" ; \
58 echo
"in your PATH and ${INSTALLDIR}/man in your MANPATH."
61 echo
"*** `pwd`: $@" ; \
62 if
[ -z
"`id | grep 'uid=.*(root)'`" ] ; then \
63 echo
"you must be root to uninstall wmpager!" ; \
66 for i in bin
/wmpager man
/man1
/wmpager
.1x
; do \
67 if
[ -f
${INSTALLDIR}/$$i ] ; then \
68 echo
"removing $$i from ${INSTALLDIR}" ; \
69 rm -f
${INSTALLDIR}/$$i ; \
72 if
[ -d
${INSTALLDIR}/share
/wmpager
] ; then \
73 echo
"removing directory $$i from ${INSTALLDIR}" ; \
74 rm -rf
${INSTALLDIR}/share
/wmpager
; \
76 echo
"uninstallation complete."