2014-01-22 21:19:53 +01:00
|
|
|
# Copyright 1999-2014 Gentoo Foundation
|
2013-04-17 08:48:39 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2014-07-14 14:23:08 +02:00
|
|
|
# $Header: /var/cvsroot/gentoo-x86/net-ftp/atftp/atftp-0.7-r3.ebuild,v 1.6 2014/01/26 12:19:45 ago Exp $
|
2013-04-17 08:48:39 +02:00
|
|
|
|
2014-07-14 14:23:08 +02:00
|
|
|
EAPI=5
|
|
|
|
inherit eutils flag-o-matic systemd versionator rpm
|
2013-04-17 08:48:39 +02:00
|
|
|
|
|
|
|
MY_PV=$(replace_version_separator 2 '.dfsg-' )
|
|
|
|
MY_PVV=$(replace_version_separator 3 'beta' $MY_PV )
|
|
|
|
MY_PVM=$(get_version_component_range 1-2 )
|
|
|
|
MY_PVR=$(get_version_component_range 1-3 )
|
2014-01-22 21:19:53 +01:00
|
|
|
OPSI="opsi40-testing"
|
|
|
|
SUSE="openSUSE_13.1"
|
2014-07-14 14:23:08 +02:00
|
|
|
|
2013-04-17 08:48:39 +02:00
|
|
|
DESCRIPTION="Advanced TFTP implementation client/server"
|
|
|
|
HOMEPAGE="ftp://ftp.mamalinux.com/pub/atftp/"
|
2014-01-22 21:19:53 +01:00
|
|
|
SRC_URI="http://download.opensuse.org/repositories/home:/uibmz:/opsi:/${OPSI}/${SUSE}/src/opsi-atftp-${MY_PV}.src.rpm"
|
2013-04-17 08:48:39 +02:00
|
|
|
|
|
|
|
LICENSE="GPL-2"
|
|
|
|
SLOT="0"
|
2014-07-14 14:23:08 +02:00
|
|
|
KEYWORDS="amd64 arm ppc ppc64 ~s390 sparc x86"
|
2013-04-17 08:48:39 +02:00
|
|
|
IUSE="selinux tcpd readline pcre"
|
|
|
|
|
|
|
|
DEPEND="tcpd? ( sys-apps/tcp-wrappers )
|
|
|
|
selinux? ( sec-policy/selinux-tftp )
|
|
|
|
readline? ( sys-libs/readline )
|
|
|
|
pcre? ( dev-libs/libpcre )"
|
|
|
|
RDEPEND="${DEPEND}
|
|
|
|
!net-ftp/netkit-tftp
|
|
|
|
!net-ftp/tftp-hpa
|
|
|
|
!net-ftp/atftp"
|
|
|
|
|
2013-04-17 08:53:27 +02:00
|
|
|
S="${WORKDIR}"/opsi-atftp-${MY_PVM}.dfsg
|
2013-04-17 08:48:39 +02:00
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
# epatch "${FILESDIR}"/atftp-${MY_PVM}-pcre.patch
|
|
|
|
epatch "${FILESDIR}"/atftp-${MY_PVM}-password.patch
|
|
|
|
epatch "${FILESDIR}"/atftp-${MY_PVM}-tests.patch
|
|
|
|
# epatch "${FILESDIR}"/atftp-${MY_PVM}-glibc24.patch
|
|
|
|
epatch "${FILESDIR}"/atftp-${MY_PVM}-blockno.patch
|
|
|
|
epatch "${FILESDIR}"/atftp-${MY_PVM}-spaced_filename.patch
|
|
|
|
epatch "${FILESDIR}"/atftp-${MY_PVM}-illreply.patch
|
|
|
|
epatch "${FILESDIR}"/atftp-${MY_PVM}-filecase.patch
|
|
|
|
# remove upstream's broken CFLAGS
|
|
|
|
sed -i.orig -e \
|
|
|
|
'/^CFLAGS="-g -Wall -D_REENTRANT"/s,".*","",g' \
|
|
|
|
"${S}"/configure
|
|
|
|
}
|
|
|
|
|
2013-04-17 08:53:27 +02:00
|
|
|
src_configure() {
|
2013-04-17 08:48:39 +02:00
|
|
|
append-flags -D_REENTRANT -DRATE_CONTROL
|
|
|
|
econf \
|
|
|
|
$(use_enable tcpd libwrap) \
|
|
|
|
$(use_enable readline libreadline) \
|
|
|
|
$(use_enable pcre libpcre) \
|
2014-07-14 14:23:08 +02:00
|
|
|
--enable-mtftp
|
2013-04-17 08:53:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
2014-07-14 14:23:08 +02:00
|
|
|
emake CFLAGS="${CFLAGS}"
|
2013-04-17 08:48:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2014-07-14 14:23:08 +02:00
|
|
|
emake install DESTDIR="${D}"
|
|
|
|
|
2013-04-17 08:48:39 +02:00
|
|
|
newinitd "${FILESDIR}"/atftp.init opsi-atftp
|
|
|
|
newconfd "${FILESDIR}"/atftp.confd opsi-atftp
|
|
|
|
|
2014-07-14 14:23:08 +02:00
|
|
|
systemd_dounit "${FILESDIR}"/atftp.service
|
|
|
|
systemd_install_serviced "${FILESDIR}"/atftp.service.conf
|
|
|
|
|
2013-04-17 08:48:39 +02:00
|
|
|
dodoc README* BUGS FAQ Changelog INSTALL TODO
|
|
|
|
dodoc "${S}"/docs/*
|
|
|
|
|
|
|
|
docinto test
|
|
|
|
cd "${S}"/test
|
|
|
|
dodoc load.sh mtftp.conf pcre_pattern.txt test.sh test_suite.txt
|
|
|
|
}
|