From bdfeaa69ef85a731c162643fa10f2918956ab0e9 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sat, 5 Dec 2009 16:30:52 +0000 Subject: new uanytun ebuild --- gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild | 39 ++++++++++++---------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild b/gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild index 064ea1b..039a888 100644 --- a/gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild +++ b/gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild @@ -23,7 +23,7 @@ S=${S}/src src_compile() { local myconf use gcrypt || myconf="--use-ssl-crypto" - use examples && myconf="${myconf} --examplesdir=/usr/share/doc/${PF}/examples/etc/" + use examples && myconf="${myconf} --examplesdir=/usr/share/doc/${PF}/examples/etc" use examples || myconf="${myconf} --no-examples" econf --ebuild-compat ${myconf} || die "configure failed" @@ -34,34 +34,37 @@ src_compile() { } src_install() { - #make target install-bin is buggy - dosbin uanytun || die "failed to copy/install an executable" - newinitd "${FILESDIR}/${PN}-0.3.1.init" uanytun || die "failed to copy/install initrd script" - - emake install-man DESTDIR="${D}" || die "failed to install manpages" + emake install DESTDIR="${D}" || die "failed to install manpages" + rm -Rf ${D}/etc/init.d + #as long as README just contains path to examples, only install it with examples + use examples || rm ${D}/etc/${PN}/README + + newinitd "${FILESDIR}/${PN}-0.3.1.init" ${PN} || die "failed to copy/install initrd script" cd ../ dodoc AUTHORS ChangeLog README || die "failed to install docs" - if use examples; then - insinto /usr/share/doc/${PF}/examples/etc/ - doins -r etc/uanytun || die "failed to install examples" - fi + #~ if use examples; then + #~ insinto /usr/share/doc/${PF}/examples/etc/ + #~ doins -r etc/uanytun || die "failed to install examples" + #~ fi } pkg_config() { - [ -e "${ROOT}"/etc/uanytun ] && die "${ROOT}/etc/uanytun/ already present, rm -R it first" - [ ! -d "${ROOT}"/usr/share/doc/${PF}/examples/etc/uanytun/ ] && \ + [ ! -d "${ROOT}"/usr/share/doc/${PF}/examples/etc/${PN}/ ] && \ die "can't copy example configs since examples were not installed (reemerge with USE=\"examples\")" - cp -vr "${ROOT}"/usr/share/doc/${PF}/examples/etc/uanytun "${ROOT}"/etc/ || die "failed to copy examples" + for example in autostart client1 client2 client3 p2p-a p2p-b; do + [ -e "${ROOT}"/etc/${PN}/${example} ] && die "${ROOT}/etc/${PN}/${example} already present, rm -R it first" + done + cp -vr "${ROOT}"/usr/share/doc/${PF}/examples/etc/${PN} "${ROOT}"/etc/ || die "failed to copy examples" } pkg_postinst() { enewgroup uanytun enewuser uanytun -1 -1 /var/run/ uanytun - einfo "Note that each VPN gets its own directory under /etc/uanytun/" - einfo " (see examples provided with the package)" - einfo "Use the following example to create gentoo-style" - einfo " uanytun.{VPN} initrd scripts for each VPN" - einfo "# ln -s /etc/init.d/uanytun /etc/init.d/uanytun.client1" + einfo "Note that each VPN gets its own directory under /etc/${PN}/" + einfo "(see examples provided with the package)" + einfo "Use the following command to create gentoo-style" + einfo "uanytun.{VPN} initrd scripts for each VPN" + einfo "# ln -s /etc/init.d/${PN} /etc/init.d/${PN}.client1" } -- cgit v1.2.3