summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Tittelbach <service-anytun@tittelbach.org>2009-12-05 16:30:52 +0000
committerBernhard Tittelbach <service-anytun@tittelbach.org>2009-12-05 16:30:52 +0000
commitbdfeaa69ef85a731c162643fa10f2918956ab0e9 (patch)
tree041c7329d450f5fe7d6ce781b73250a899425950
parent--ebuild-compat still needed (diff)
new uanytun ebuild
-rw-r--r--gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild39
1 files 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"
}