File: Makefile

package info (click to toggle)
cereal 0.24-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 176 kB
  • sloc: sh: 425; makefile: 39
file content (56 lines) | stat: -rw-r--r-- 1,924 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
#!/usr/bin/make -f

# Makefile for cereal

# (c) 2007 Jameson Graef Rollins <jrollins@finestructure.net>
# Licensed under GPL v3 or later

VERSION := `head -n1 debian/changelog | sed 's/.*(\([^-]*\)-.*/\1/'`

# these defaults are for debian.  porters should probably adjust them
# before calling make install
ETCPREFIX ?= 
ETCSUFFIX ?= 
PREFIX ?= /usr
MANPREFIX ?= $(PREFIX)/share/man

# nothing to do for builds: this is a package of mostly scripts.
build:
	

tarball: clean
	rm -rf cereal-$(VERSION)
	mkdir -p cereal-$(VERSION)
	ln -s ../COPYING ../Makefile ../src ../etc ../man ../doc cereal-$(VERSION)
	tar ch --exclude='*~' --exclude='*.svn*' cereal-$(VERSION) | gzip -n > cereal_$(VERSION).orig.tar.gz
	rm -rf cereal-$(VERSION)

debian-package: tarball
	tar xzf cereal_$(VERSION).orig.tar.gz
	tar c --exclude='*~' --exclude='*.svn*' debian | tar x -C cereal-$(VERSION)
	(cd cereal-$(VERSION) && debuild -us -uc)
	rm -rf cereal-$(VERSION)

install: installman
	install -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/sbin $(DESTDIR)$(PREFIX)/share/cereal
	install -d $(DESTDIR)$(ETCPREFIX)/etc/cereal
	install -d $(DESTDIR)$(PREFIX)/share/doc/cereal
	install src/cereal $(DESTDIR)$(PREFIX)/bin
	install src/cereal-admin $(DESTDIR)$(PREFIX)/sbin
	install -m 0644 src/common $(DESTDIR)$(PREFIX)/share/cereal
	install src/mainrun src/logrun src/finish $(DESTDIR)$(PREFIX)/share/cereal
	install -m 0644 etc/cereal-admin.conf $(DESTDIR)$(ETCPREFIX)/etc/cereal/cereal-admin.conf$(ETCSUFFIX)
	install -m 0644 etc/screenrc $(DESTDIR)$(ETCPREFIX)/etc/cereal/screenrc$(ETCSUFFIX)
	install doc/* $(DESTDIR)$(PREFIX)/share/doc/cereal

installman:
	install -d $(DESTDIR)$(MANPREFIX)/man1 $(DESTDIR)$(MANPREFIX)/man8
	gzip -n man/*/*
	install man/man1/* $(DESTDIR)$(MANPREFIX)/man1
	install man/man8/* $(DESTDIR)$(MANPREFIX)/man8
	gzip -d man/*/*

clean:
	rm -f cereal_*

.PHONY: build tarball debian-package install installman clean