diff --git a/packages/gentoo/fspd-2.8.1_beta28.ebuild b/packages/gentoo/fspd-2.8.1_beta28.ebuild new file mode 100644 index 0000000..f5017da --- /dev/null +++ b/packages/gentoo/fspd-2.8.1_beta28.ebuild @@ -0,0 +1,42 @@ +# fspd Gentoo ebuild +# Created by 2019 Radim Kolar +# Public domain + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_6 ) +inherit python-any-r1 multilib scons-utils toolchain-funcs + +DESCRIPTION="FSP server" +HOMEPAGE="http://fsp.sourceforge.net/" +SRC_URI="mirror://sourceforge/fsp/fsp/${PV/_beta/b}/fsp-${PV/_beta/b}.tar.bz2" +S=${WORKDIR}/fsp-${PV/_beta/b} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +BDEPEND="sys-devel/flex" + +src_configure() { + MYSCONS=( + CC="$(tc-getCC)" + prefix=${D} + without-clients=yes + mandir=${D}/usr/share/man + docdir=${D}/usr/share/doc/${PF} + sysconfdir=/etc + ) +} + +src_compile() { + escons "${MYSCONS[@]}" +} + +src_install() { + escons "${MYSCONS[@]}" install + rm -f ${D}/bin/fspscan ${D}/usr/share/man/man1/fspscan* + mkdir -p ${D}/etc + mv ${D}/share/examples/fsp/fspd.conf ${D}/etc + rm -rf ${D}/share +} diff --git a/packages/redhat/fspd.init b/packages/redhat/fspd.init new file mode 100755 index 0000000..bbe04a6 --- /dev/null +++ b/packages/redhat/fspd.init @@ -0,0 +1,78 @@ +#!/bin/sh +# +# fsp This script starts and stops the File Service Protocol daemon +# +# chkconfig: 345 85 15 +# +# description: FSP is a UDP based protocol to access files similar to \ +# anonymous ftp. +# +#This init script was written by Sven 'Hoaxter' Hoexter +#Writen for RH 7.3 + +. /etc/init.d/functions + +OPTIONS="" +RETVAL=0 +prog="FSPd" +PROG="/usr/bin/fspd" + +if [ -f /etc/sysconfig/fspd ]; then + . /etc/sysconfig/fspd +fi + +[ -f $PROG ] || exit 0 + + +start() { + echo -n $"Starting $prog: " + daemon $PROG $OPTIONS + RETVAL=$? + echo + touch /var/lock/subsys/$prog + return $RETVAL +} + +stop() { + echo -n $"Stopping $prog: " + killproc $PROG + RETVAL=$? + echo + rm -f /var/lock/subsys/$prog + return $RETVAL +} + +reload(){ + stop + start +} + +restart(){ + stop + start +} + + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + status) + status snmpd + RETVAL=$? + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|reload}" + RETVAL=1 +esac + +exit $RETVAL diff --git a/packages/redhat/fspd.spec b/packages/redhat/fspd.spec new file mode 100644 index 0000000..7673406 --- /dev/null +++ b/packages/redhat/fspd.spec @@ -0,0 +1,100 @@ +%define name fspd +%define sname fsp + +Summary: File Service Protocol Daemon +Name: %{name} +Version: 2.8.1b29 +Release: hsn0 +Group: System Environment/Daemons +License: BSD/MIT/X +URL: http://fsp.sourceforge.net +Source0: %{sname}-%{version}.tar.bz2 +Source1: fspd.init +BuildRequires: glibc-devel scons >= 3.0.0 flex + +%description +FSP is a set of programs that implements a public-access +archive similar to an anonymous-FTP archive. It is not +meant to be a replacement for FTP; it is only meant to do +what anonymous-FTP does, but in a manner more acceptable +to the provider of the service and more friendly to the +clients. +FSP is UDP based and very useful on slow connections +and in a Wireless LAN. +This Package contains the fspd server program. + +%prep +%setup -q -n %{sname}-%{version} + +%build +scons prefix=%{buildroot}%_prefix \ + sysconfdir=%_sysconfdir \ + mandir=%{buildroot}%_mandir \ + docdir=%{buildroot}/not-used \ + without-clients=yes \ + without-fspscan=yes + +%install +scons prefix=%{buildroot}%_prefix \ + sysconfdir=%_sysconfdir \ + mandir=%{buildroot}%_mandir \ + docdir=%{buildroot}/not-used \ + without-clients=yes \ + without-fspscan=yes \ + install +# --install-sandbox=%{buildroot} +rm -rf %{buildroot}/not-used + +# config file +mkdir -p %{buildroot}%{_sysconfdir} +cp -a fspd.conf %{buildroot}%{_sysconfdir} + +#init script +mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d +cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/rc.d/init.d/fspd + +%post +if [ $1 = 1 ]; then + /sbin/chkconfig --add fspd +fi + +%preun +if [ $1 = 0 ]; then + /sbin/service fspd stop >/dev/null 2>&1 || : + /sbin/chkconfig --del fspd +fi + +%postun +if [ $1 -ge 1 ]; then + /sbin/service fspd restart >/dev/null 2>&1 +fi + +%files +%defattr(-, root, root) +%doc BETA.README ChangeLog fspd.conf COPYRIGHT INFO INSTALL TODO +%config(noreplace) %{_sysconfdir}/fspd.conf +%{_bindir}/fspd +%{_mandir}/man?/fspd.* +%{_sysconfdir}/rc.d/init.d/fspd + + +%changelog +* Sat Aug 24 2019 Radim Kolar +- new upstream release 2.8.1b29 +- tested on Centos 7 + +* Tue Jan 13 2004 Sven Hoexter +- new upstream release 2.8.1b19 + +* Tue Nov 18 2003 Sven Hoexter +- new upstream release 2.8.1b17 +- release should build with old flex versions +- fixed prob with condrestart in the postun scriptled + it's not supported by the init script + +* Sun Oct 26 2003 Sven Hoexter +- changed the contents and names to the Debian naming scheme +- corrected my email address + +* Sun Aug 24 2003 Sven Hoexter +- Initial build.