-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (39 loc) · 1.38 KB
/
Makefile
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
PACKAGE=mimepipe
VERSION=0.1
prefix=/usr/local
exec_prefix=${prefix}
bindir=${exec_prefix}/bin
sysconfdir=${prefix}/etc
datadir=${prefix}/share
mandir=${datadir}/man
libexecdir=${exec_prefix}/lib
sharedstatedir=${prefix}/com
.PHONY: install install-bin install-libexec install-man \
manpages clean dist spec rpm test
clean:
$(RM) -r build
install: install-bin install-libexec install-man
install-bin:
install -dm0755 $(DESTDIR)/$(bindir)
ln -s $(libexecdir)/$(PACKAGE)/$(PACKAGE) $(DESTDIR)/$(bindir)/$(PACKAGE)
install-libexec:
install -dm0755 $(DESTDIR)/$(libexecdir)/$(PACKAGE)
cp -rf src/main/libexec/* $(DESTDIR)/$(libexecdir)/$(PACKAGE)
manpages: build/man/man1/$(PACKAGE).1
build/man/man1/$(PACKAGE).1: src/main/libexec/$(PACKAGE)
mkdir -p build/man/man1
pod2man --utf8 --center='User commans' --name=$(shell perl -e 'print uc $(PACKAGE)') --quotes=none $< $@
install-man: manpages
install -dm0755 $(DESTDIR)/$(mandir)/man1
cp -rf build/man/man1 $(DESTDIR)/$(mandir)/
spec: build/obs/$(PACKAGE).spec
build/obs/$(PACKAGE).spec: src/obs/$(PACKAGE).spec.m4
mkdir -p $(dir $@)
m4 -D__VERSION__=$(VERSION) <$< >$@
build/obs/$(PACKAGE)-$(VERSION).tar.xz::
git archive --verbose --prefix=$(PACKAGE)-$(VERSION)/ -o $@ HEAD
dist: spec build/obs/$(PACKAGE)-$(VERSION).tar.xz
rpm: dist
env -C build/obs/ osc build -k . --no-service --alternative-project home:urbic
test:
@src/test/test