/[gnump3d]/gnump3d/Makefile
ViewVC logotype

Diff of /gnump3d/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by skx, Wed Oct 15 10:15:28 2003 UTC revision 1.6 by skx, Mon Oct 27 15:11:20 2003 UTC
# Line 1  Line 1 
1    # $Id$
2  #  #
3  #  Makefile for GNUMP3d v2.x  #  Makefile for GNUMP3d v2.x
4  #  #
5    # Steve
6    # --
7    #
8    #
9    
10    
11    #
12    #  Installation Directories.
13    #
14  PREFIX      = /usr  PREFIX      = /usr
15    CONFDIR     = /etc/gnump3d
16    CACHEDIR    = /var/cache/gnump3d
17    SERVEDIR    = /var/cache/gnump3d/serving
18    LOGDIR      = /var/log/gnump3d
19    LIBDIR      = `perl bin/getlibdir`
20    
21    #
22    #  Directories for the binaries, the templates, the plugins and man pages.
23    # These are based upon the settings above.
24    #
25    BINDIR      = $(PREFIX)/bin
26    TEMPDIR     = $(PREFIX)/share/gnump3d
27    MANDIR      = $(PREFIX)/man/man1
28    PLUGDIR     = $(LIBDIR)/gnump3d/plugins
29    LANGDIR     = $(LIBDIR)/gnump3d/lang
30    
31    
32    #
33    #  Only used to build distribution tarballs.
34    #
35  DIST_PREFIX = /tmp  DIST_PREFIX = /tmp
36  VERSION     = 2.6  VERSION     = 2.6
37  BASE        = gnump3d  BASE        = gnump3d
38    
 LIBDIR      = `perl bin/getlibdir`  
39    
40    
41    #
42    #  Default target, give the user some help.
43    #
44  default:  default:
45          @echo "gnump3d 2.x Makefile"          @echo "gnump3d 2.x Makefile"
46          @echo ""          @echo ""
47          @echo " Use:"          @echo " Use:"
48          @echo "    make install   - Install the software in /usr/bin."          @echo "    make install   - Install the software in ${BINDIR}."
49          @echo "    make uninstall - Removes this software completely."          @echo "    make uninstall - Removes this software completely."
50          @echo "    make dist      - Create a distribution tarball."          @echo "    make dist      - Create distribution archives."
51          @echo "    make sign      - GPG sign the distribution files."          @echo "    make sign      - GPG sign the distribution files."
52            @echo "    make profile   - Run the installed application under the profiler"
53            @echo "    make test      - Run the test suite."
54            @echo "    make debug     - Show debug diagnostics from this Makefile"
55          @echo ""          @echo ""
56          @echo " For more details see:"          @echo " For more details see:"
57          @echo "    http://www.gnump3d.org/"          @echo "    http://www.gnump3d.org/"
58          @echo " "          @echo " "
59    
60    debug:
61            @echo "System information:"
62            @echo "  I am `whoami` on `hostname`"
63            @echo " "
64            @echo "  This is `uname`"
65            @echo " "
66            @echo "Installation options:"
67            @echo "    Binary directory  : ${BINDIR}"
68            @echo "    Man page directory: ${MANDIR}"
69            @echo "    Template directory: ${TEMPDIR}"
70            @echo "    Plugin directory  : ${PLUGDIR}"
71            @echo "    Language directory: ${LANGDIR}"
72    
73    
74  install:  install:
75          install -d $(LIBDIR)/gnump3d/plugins          install -d ${CONFDIR}
76          install -d $(LIBDIR)/gnump3d/lang          install -d ${BINDIR}
77          install -d $(PREFIX)/share/gnump3d          install -d ${TEMPDIR}
78          install -d $(PREFIX)/bin          install -d ${MANDIR}
79          install -d $(PREFIX)/man/man1          install -d ${PLUGDIR}
80          install -d /var/log/gnump3d          install -d ${LANGDIR}
81          install -d /var/cache/gnump3d          install -d ${LOGDIR}
82          install -d /var/cache/gnump3d/serving          install -d ${CACHEDIR}
83          install -d /etc/gnump3d          chmod 777 ${CACHEDIR}
84          chown -R root:root $(LIBDIR)/gnump3d/          install -d $(SERVEDIR)
85          chmod a+rx $(LIBDIR)/gnump3d/          chmod 777 ${SERVEDIR}
86          chmod a+rx $(LIBDIR)/gnump3d/plugins          chmod a+rx ${LIBDIR}/gnump3d/
87          chmod a+rx $(LIBDIR)/gnump3d/lang          chmod a+rx ${LIBDIR}/gnump3d/plugins
88          chmod 777 /var/cache/gnump3d          chmod a+rx ${LIBDIR}/gnump3d/lang
89          chmod 777 /var/cache/gnump3d/serving          cp lib/gnump3d/*.pm ${LIBDIR}/gnump3d
90          chown root:root /var/cache/gnump3d          cp lib/gnump3d/plugins/*.pm ${PLUGDIR}
91          cp lib/gnump3d/*.pm $(LIBDIR)/gnump3d          cp lib/gnump3d/lang/*.pm ${LANGDIR}
92          -rm -f $(LIBDIR)/gnump3d/FreezeThaw.pm          cp bin/gnump3d2 ${BINDIR}
93          cp lib/gnump3d/plugins/*.pm $(LIBDIR)/gnump3d/plugins          chmod 755 ${BINDIR}/gnump3d2
94          cp lib/gnump3d/lang/*.pm $(LIBDIR)/gnump3d/lang          -ln -s ${BINDIR}/gnump3d2 ${BINDIR}/gnump3d
         cp bin/gnump3d2 $(PREFIX)/bin/  
         chmod 755 $(PREFIX)/bin/gnump3d2  
         chown root:root $(PREFIX)/bin/gnump3d2  
         -ln -s $(PREFIX)/bin/gnump3d2 $(PREFIX)/bin/gnump3d  
95          cp bin/gnump3d-top $(PREFIX)/bin          cp bin/gnump3d-top $(PREFIX)/bin
96          chmod 755 $(PREFIX)/bin/gnump3d-top          chmod 755 ${BINDIR}/gnump3d-top
97          chown root:root  $(PREFIX)/bin/gnump3d-top          cp bin/gnump3d-index ${BINDIR}
98          cp bin/gnump3d-index $(PREFIX)/bin          chmod 755 ${BINDIR}/gnump3d-index
99          chmod 755 $(PREFIX)/bin/gnump3d-index          cp man/gnump3d-top.1 ${MANDIR}
100          chown root:root  $(PREFIX)/bin/gnump3d-index          cp man/gnump3d-index.1 ${MANDIR}
101          cp man/gnump3d-top.1 $(PREFIX)/man/man1          cp man/gnump3d.1 ${MANDIR}
102          cp man/gnump3d-index.1 $(PREFIX)/man/man1          cp man/gnump3d.conf.1 ${MANDIR}
103          cp man/gnump3d.1 $(PREFIX)/man/man1          cp -R templates/* ${TEMPDIR}
104          cp man/gnump3d.conf.1 $(PREFIX)/man/man1          chmod -R a+r ${TEMPDIR}
105          cp -R templates/* $(PREFIX)/share/gnump3d          chmod +rx ${TEMPDIR}/*/
106          chmod -R a+r $(PREFIX)/share/gnump3d/          if [ -e ${CONFDIR}/gnump3d.conf ]; then cp ${CONFDIR}/gnump3d.conf ${CONFDIR}/gnump3d.conf-orig ; fi
107          chmod +rx $(PREFIX)/share/gnump3d/*/          sed "s#PLUGINDIR#${LIBDIR}#g" etc/gnump3d.conf > ${CONFDIR}/gnump3d.conf
108          if [ -e /etc/gnump3d/gnump3d.conf ]; then cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf-orig ; fi          cp etc/mime.types ${CONFDIR}
         sed "s#PLUGINDIR#${LIBDIR}#g" etc/gnump3d.conf > /etc/gnump3d/gnump3d.conf  
         cp etc/mime.types /etc/gnump3d  
109          -find $(PREFIX)/share/gnump3d -name "plugin.html" -print | xargs rm -f          -find $(PREFIX)/share/gnump3d -name "plugin.html" -print | xargs rm -f
110            -rm -f $(LIBDIR)/gnump3d/FreezeThaw.pm
111            -rm -f $(LIBDIR)/gnump3d/playlist.pm
112    
113    
114  uninstall:  uninstall:
115          rm -f $(PREFIX)/bin/gnump3d-top          rm -f ${BINDIR}/gnump3d-top
116          rm -f $(PREFIX)/bin/gnump3d-index          rm -f ${BINDIR}/gnump3d-index
117          rm -f $(PREFIX)/bin/gnump3d2 $(PREFIX)/bin/gnump3d          rm -f ${BINDIR}/gnump3d2
118          rm -f $(PREFIX)/man/man1/gnump3d-top.1          rm -f ${BINDIR}/gnump3d
119          rm -f $(PREFIX)/man/man1/gnump3d-index.1          rm -f ${MANDIR}/gnump3d-top.1
120          rm -f $(PREFIX)/man/man1/gnump3d.1          rm -f ${MANDIR}/gnump3d-index.1
121          rm -f $(PREFIX)/man/man1/gnump3d.conf.1          rm -f ${MANDIR}/gnump3d.1
122            rm -f ${MANDIR}/gnump3d.conf.1
123          rm -rf $(LIBDIR)/gnump3d/          rm -rf $(LIBDIR)/gnump3d/
124          rm -rf $(PREFIX)/share/gnump3d/          rm -rf ${TEMPDIR}
125          rm -f   /etc/gnump3d/gnump3d.conf          rm -f   /etc/gnump3d/gnump3d.conf
126          -rm -rf /etc/gnump3d          -rm -rf ${CONFDIR}
127          -rm -rf /var/log/gnump3d          -rm -rf {$LOGDIR}
128            -rm -rf ${CACHEDIR}
129            -rm -rf ${SERVEDIR}
130    
131  .PHONY: test install sign  .PHONY: test install sign
132    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26