source: trunk/base/src/portindex/Makefile @ 14467

Last change on this file since 14467 was 14467, checked in by jmpp, 15 years ago

Submitted by: jmpp@

Lets assure all our Makefiles respect a temporary ${DESTDIR} installation.
Also some minor cleanups here and there.

  • Property svn:eol-style set to native
File size: 1006 bytes
Line 
1INSTALL     = /usr/bin/install -c
2PREFIX     ?= /Library/WebServer/Documents/ports
3cgibin      = $(PREFIX)/cgi-bin
4portindex   = $(PREFIX)/index
5portfiles   = $(PREFIX)/files
6srcdir      = .
7
8all: portregister.cgi portsubmit.cgi initialize.sql register.html
9
10%.cgi: %.pl
11        @ echo $@
12        @ cat $< | sed "/@@PREFIX@@/s//$(subst /,\/,$(PREFIX))/" > $@
13
14install: all
15        mkdir -p ${DESTDIR}$(PREFIX)
16        chown www:www ${DESTDIR}$(PREFIX)
17        chmod 0775 ${DESTDIR}$(PREFIX)
18        $(INSTALL) -m 644 register.html ${DESTDIR}$(PREFIX)
19        mkdir -p ${DESTDIR}$(cgibin)
20        chown www:www ${DESTDIR}$(cgibin)
21        chmod 0775 ${DESTDIR}$(cgibin)
22        $(INSTALL) -m 755 portsubmit.cgi ${DESTDIR}$(cgibin)
23        $(INSTALL) -m 755 portregister.cgi ${DESTDIR}$(cgibin)
24        mkdir -p ${DESTDIR}$(portindex)
25        chown www:www ${DESTDIR}$(portindex)
26        chmod 0775 ${DESTDIR}$(portindex)
27        mkdir -p ${DESTDIR}$(portfiles)
28        chown www:www ${DESTDIR}$(portfiles)
29        chmod 0775 ${DESTDIR}$(portfiles)
30        $(INSTALL) -m 644 initialize.sql ${DESTDIR}$(portindex)
31
32clean:
33        rm -f *.cgi
Note: See TracBrowser for help on using the repository browser.