File: Makefile

package info (click to toggle)
ikiwiki-hosting 0.20140613
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 788 kB
  • ctags: 283
  • sloc: perl: 5,124; sh: 182; ansic: 168; makefile: 50
file content (60 lines) | stat: -rw-r--r-- 1,812 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
BINDIR=$(DESTDIR)/usr/bin
ETCDIR=$(DESTDIR)/etc
MODDIR=$(DESTDIR)/usr/share/perl5/

CFLAGS=-O2 -Wall -g
BINS=iki-git-shell iki-git-hook-update ikisite-wrapper
SCRIPTS=ikisite ikidns ikiwiki-hosting-web-daily ikiwiki-hosting-web-backup \
	ikisite-delete-unfinished-site iki-ssh-unsafe
MANS=ikisite ikidns ikisite-wrapper ikiwiki-hosting-web-daily \
     	ikiwiki-hosting-web-backup ikisite-delete-unfinished-site \
	iki-git-hook-update iki-git-shell iki-ssh-unsafe

IKIWIKI=ikiwiki --wikiname "ikiwiki hosting internals" \
		--no-usedirs --underlaydir=/dev/null \
		--plugin goodstuff \
		--disable-plugin smiley --disable-plugin shortcut \
		--disable-plugin relativedate --disable-plugin toggle \
		--disable-plugin openid \
		doc html

include ./ikiwiki-hosting.conf

all: build test

build: $(BINS)
	$(IKIWIKI)
	
	for man in $(MANS); do \
		./mdwn2man $$man 1 doc/$$man.mdwn > $$man.1; \
	done

test:
	perl "-MExtUtils::Command::MM" "-e" "test_harness(0, '.')" t/*.t

clean:
	$(IKIWIKI) --clean
	rm -f $(BINS)
	for man in $(MANS); do \
		rm -f $$man.1; \
	done

install:
	install -d $(BINDIR)
	install -m 0755 $(SCRIPTS) $(BINS) $(BINDIR)

	install -d $(ETCDIR)/ikiwiki-hosting/config
	install -m 0644 ikiwiki-hosting.conf $(ETCDIR)/ikiwiki-hosting
	install -d $(ETCDIR)/ikiwiki-hosting/autosetup
	cp autosetup/* $(ETCDIR)/ikiwiki-hosting/autosetup
	install -d $(ETCDIR)/ikiwiki-hosting/templates
	cp templates/* $(ETCDIR)/ikiwiki-hosting/templates

	install -d $(MODDIR)/IkiWiki/Plugin $(MODDIR)/IkiWiki/Setup
	install -m 0644 IkiWiki/*.pm $(MODDIR)/IkiWiki/
	install -m 0644 IkiWiki/Plugin/*.pm $(MODDIR)/IkiWiki/Plugin/
	install -m 0644 IkiWiki/Setup/*.pm $(MODDIR)/IkiWiki/Setup/

	mkdir -p $(DESTDIR)/$(lockdir)
	mkdir -p $(DESTDIR)/$(gitdaemondir)
	mkdir -p $(DESTDIR)/$(shell dirname $(accountinglog))