First pass at patches to update various packages to recent autotools (first pass...
[vuplus_openembedded] / base-passwd / base-passwd_3.5.4.oe
1 DEPENDS = virtual/libc
2 RDEPENDS = libc6
3
4 SRC_URI := ${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_3.5.4.tar.gz \
5            file://${FILESDIR}/configure.patch;patch=1
6 S := ${WORKDIR}/${P}
7
8 inherit autotools
9
10 #do_compile_append () {
11 #       oe_runmake -C doc
12 #}
13
14 do_install () {
15         install -d -m 755 ${D}/${sbindir}
16         install -p -m 755 update-passwd ${D}/${sbindir}/
17         install -d -m 755 \
18                 ${D}/${mandir}/man8 ${D}/${mandir}/pl/man8
19         install -p -m 644 man/update-passwd.8 \
20                 ${D}/${mandir}/man8/
21         install -p -m 644 man/update-passwd.pl.8 \
22                 ${D}/${mandir}/pl/man8/update-passwd.8
23         gzip -9 ${D}/${mandir}/man8/* \
24                 ${D}/${mandir}/pl/man8/*
25         install -d -m 755 ${D}/${datadir}/base-passwd
26         install -p -m 644 passwd.master \
27                 ${D}/${datadir}/base-passwd/
28         install -p -m 644 group.master \
29                 ${D}/${datadir}/base-passwd/
30
31         install -d -m 755 ${D}/${docdir}/${P}
32         install -p -m 644 debian/changelog ${D}/${docdir}/${P}/
33         gzip -9 ${D}/${docdir}/${P}/*
34         install -p -m 644 README ${D}/${docdir}/${P}/
35         install -p -m 644 debian/copyright ${D}/${docdir}/${P}/
36 #       install -p -m 644 \
37 #               doc/users-and-groups.html doc/users-and-groups.txt \
38 #               ${D}/${docdir}/${P}/
39 #       gzip -9 ${D}/${docdir}/${P}/users-and-groups.txt
40 }
41
42 pkg_postinst () {
43         set -e
44
45         if [ X"$1" != Xconfigure ]; then
46                 exit 0
47         fi
48
49         if ! [ -x ${sbindir}/update-passwd ]; then
50                 echo >&2 "`dirname $0`: ${sbindir}/update-passwd does not exist,"
51                 echo >&2 "or is not executable"
52                 exit 1
53         fi
54
55         if [ ! -e ${D}/${sysconfdir}/passwd ] ; then
56                 cp ${D}/${datadir}/base-passwd/passwd.master ${D}/${sysconfdir}/passwd
57         fi
58         
59         if [ ! -e ${D}/${sysconfdir}/group ] ; then
60                 cp ${D}/${datadir}/base-passwd/group.master ${D}/${sysconfdir}/group
61         fi
62         
63 #       update-passwd -p ${D}/${datadir}/base-passwd/passwd.master \
64 #                     -g ${D}/${datadir}/base-passwd/group.master \
65 #                     -P ${D}/${sysconfdir}/passwd \
66 #                     -G ${D}/${sysconfdir}/group \
67 #                     -S ${D}/${sysconfdir}/shadow --dry-run
68         exit 0
69 }