Release 3.2
[openresolv] / Makefile
1 NAME=           openresolv
2 VERSION=        3.2
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 VARDIR?=        ${VARBASE}/run/resolvconf
18 MANDIR?=        ${MANPREFIX}/man
19
20 RESOLVCONF=     resolvconf resolvconf.8 resolvconf.conf.5
21 SUBSCRIBERS=    libc dnsmasq named
22 TARGET=         ${RESOLVCONF} ${SUBSCRIBERS}
23
24 .SUFFIXES: .in
25
26 all: ${TARGET}
27
28 .in:
29         sed -e 's:@PREFIX@:${PREFIX}:g' \
30                 -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \
31                 -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' \
32                 -e 's:@VARDIR@:${VARDIR}:g' \
33                 $@.in > $@
34
35 clean:
36         rm -f ${TARGET} openresolv-${VERSION}.tar.bz2
37
38 installdirs:
39
40 install: ${TARGET}
41         ${INSTALL} -d ${DESTDIR}${BINDIR}
42         ${INSTALL} -m ${BINMODE} resolvconf ${DESTDIR}${BINDIR}
43         ${INSTALL} -d ${DESTDIR}${SYSCONFDIR}
44         ${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR}
45         ${INSTALL} -d ${DESTDIR}${LIBEXECDIR}
46         ${INSTALL} -m ${BINMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR}
47         ${INSTALL} -d ${DESTDIR}${MANDIR}/man8
48         ${INSTALL} -m ${MANMODE} resolvconf.8 ${DESTDIR}${MANDIR}/man8
49         ${INSTALL} -d ${DESTDIR}${MANDIR}/man5
50         ${INSTALL} -m ${MANMODE} resolvconf.conf.5 ${DESTDIR}${MANDIR}/man5
51
52 dist:
53         ${INSTALL} -d /tmp/${PKG}
54         cp -RPp . /tmp/${PKG}
55         (cd /tmp/${PKG}; ${MAKE} clean)
56         rm -rf /tmp/${PKG}/*.bz2 /tmp/${PKG}/.svn
57         tar cvjpf ${PKG}.tar.bz2 -C /tmp ${PKG} 
58         rm -rf /tmp/${PKG} 
59         ls -l ${PKG}.tar.bz2