Release 3.1
[openresolv] / Makefile
1 NAME=           openresolv
2 VERSION=        3.1
3 PKG=            ${NAME}-${VERSION}
4
5 INSTALL?=       install
6 PREFIX?=        /usr/local
7 MANPREFIX?=     /usr/share
8 VARBASE?=       /var
9
10 BINMODE?=       0755
11 DOCMODE?=       0644
12 MANMODE?=       0444
13
14 SYSCONFDIR?=    ${PREFIX}/etc
15 BINDIR=         ${PREFIX}/sbin
16 LIBEXECDIR?=    ${PREFIX}/libexec/resolvconf
17 MANDIR?=        ${MANPREFIX}/man
18
19 RESOLVCONF=     resolvconf resolvconf.8 resolvconf.conf.5
20 SUBSCRIBERS=    libc dnsmasq named
21 TARGET=         ${RESOLVCONF} ${SUBSCRIBERS}
22
23 .SUFFIXES: .in
24
25 all: ${TARGET}
26
27 .in:
28         sed -e 's:@PREFIX@:${PREFIX}:g' \
29                 -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \
30                 -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' \
31                 -e 's:@VARBASE@:${VARBASE}:g' \
32                 $@.in > $@
33
34 clean:
35         rm -f ${TARGET} openresolv-${VERSION}.tar.bz2
36
37 installdirs:
38
39 install: ${TARGET}
40         ${INSTALL} -d ${DESTDIR}${BINDIR}
41         ${INSTALL} -m ${BINMODE} resolvconf ${DESTDIR}${BINDIR}
42         ${INSTALL} -d ${DESTDIR}${SYSCONFDIR}
43         ${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR}
44         ${INSTALL} -d ${DESTDIR}${LIBEXECDIR}
45         ${INSTALL} -m ${BINMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR}
46         ${INSTALL} -d ${DESTDIR}${MANDIR}/man8
47         ${INSTALL} -m ${MANMODE} resolvconf.8 ${DESTDIR}${MANDIR}/man8
48         ${INSTALL} -d ${DESTDIR}${MANDIR}/man5
49         ${INSTALL} -m ${MANMODE} resolvconf.conf.5 ${DESTDIR}${MANDIR}/man5
50
51 dist:
52         ${INSTALL} -d /tmp/${PKG}
53         cp -RPp . /tmp/${PKG}
54         (cd /tmp/${PKG}; ${MAKE} clean)
55         rm -rf /tmp/${PKG}/*.bz2 /tmp/${PKG}/.svn
56         tar cvjpf ${PKG}.tar.bz2 -C /tmp ${PKG} 
57         rm -rf /tmp/${PKG} 
58         ls -l ${PKG}.tar.bz2