File: rules

package info (click to toggle)
cern-httpd 3.0A-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 5,392 kB
  • ctags: 6,554
  • sloc: ansic: 37,902; makefile: 1,747; perl: 536; csh: 167; sh: 160
file content (116 lines) | stat: -rwxr-xr-x 3,623 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/usr/bin/make -f
# debian/rules file for cern-httpd, based on:
# Sample debian.rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
 # my name from the file itself.  (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified
#
# Modified to be a prototype for debmake by Christoph Lameter <clameter@debian.org>

package=cern-httpd

##
# These macros are used in the install - the cern-httpd BUILD.SH and
# makefiles don't have an install target. Boo, hiss.

INSTALL = install
INSTALL_BIN = $(INSTALL) --owner=root --group=root --mode=0755
INSTALL_LIB = $(INSTALL) --owner=root --group=root --mode=0644
INSTALL_DIR = $(INSTALL) --directory --owner=root --group=root --mode=0755

FAKE_ROOT = debian/tmp
PREFIX = /usr

BINDIR = $(FAKE_ROOT)$(PREFIX)/sbin

CONFDIR = $(FAKE_ROOT)/etc

LIBDIR = $(FAKE_ROOT)$(PREFIX)/lib/cern-httpd
ICONDIR = $(LIBDIR)/icons
SERVERSCRIPTDIR = $(LIBDIR)/cgi-bin

DOCDIR = $(FAKE_ROOT)$(PREFIX)/doc/cern-httpd
EXAMPLEDIR = $(DOCDIR)/examples

build:
	$(checkdir)
	make CFLAGS="-O2 -g -Wall -DDEBIAN" LFLAGS="-lcrypt"
	touch build

clean:
	$(checkdir)
	-rm -f build
	-make clobber
	-rm -f `find . -name "*~"`
	-rm -rf debian/tmp debian/files* core debian/substvars

cleanlight: #This target exists because the cern make files are broken --
            # if the library exists, is doesn't rebuild files.
	$(checkdir)
	rm -f build
	rm -f Library/linux/libwww.a

binary-indep:	checkroot build
	$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch:	checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	install -d debian/tmp
	cd debian/tmp;install -d `cat ../dirs`
	# Install the package files.
	$(INSTALL_DIR) $(BINDIR)
	$(INSTALL_DIR) $(LIBDIR)
	$(INSTALL_BIN) Daemon/linux/httpd_3.0A $(BINDIR)/cern-httpd
	$(INSTALL_BIN) Daemon/linux/cgiparse $(BINDIR)/cgiparse
	$(INSTALL_BIN) Daemon/linux/cgiutils $(BINDIR)/cgiutils
	$(INSTALL_BIN) Daemon/linux/htadm $(BINDIR)/htadm
	$(INSTALL_BIN) debian/httpdconfig $(BINDIR)/httpdconfig
	$(INSTALL_BIN) debian/test_standalone $(LIBDIR)/test_standalone

	$(INSTALL_DIR) $(SERVERSCRIPTDIR)
	$(INSTALL_BIN) Daemon/linux/htimage $(SERVERSCRIPTDIR)/htimage

	$(INSTALL_DIR) $(ICONDIR)
	$(INSTALL_LIB) server_root/icons/* $(ICONDIR)

	$(INSTALL_DIR) $(DOCDIR)
	$(INSTALL_LIB) COPYRIGH $(DOCDIR)/copyright 

	$(INSTALL_DIR) $(EXAMPLEDIR)
	$(INSTALL_LIB) server_root/config/all.conf $(EXAMPLEDIR)/httpd-all.conf
	$(INSTALL_LIB) server_root/config/caching.conf $(EXAMPLEDIR)/httpd-caching.conf
	$(INSTALL_LIB) server_root/config/prot.conf $(EXAMPLEDIR)/httpd-prot.conf
	$(INSTALL_LIB) server_root/config/proxy.conf $(EXAMPLEDIR)/httpd-proxy.conf
# Must have debmake installed for this to work. Otherwise please copy
# /usr/bin/debstd into the debian directory and change debstd to debian/debstd
	debstd -u README README-SOCKS 
	# Fix up symlinks
	(cd debian/tmp/usr/man/man8; for name in *.8 ; do mv $$name $$name.gz; done)
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: binary binary-arch binary-indep clean checkroot