Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37518163
en ru br
Репозитории ALT
S:1.2.3-alt6
5.1: 1.2.3-alt2.M51.1
4.1: 1.2.3-alt1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: ftpproxy

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

# Spec file for ftpproxy

Name: ftpproxy
Version: 1.2.3
Release: alt5

Summary: FTP proxy with optional access and command control

License: %gpl2plus
Group: System/Servers
URL: http://www.ftpproxy.org

Packager: Nikolay A. Fetisov <naf at altlinux.ru>

Source:  %name-%version.tar
Source1: %name.conf
Source2: %name.xinetd
Source3: %name.logrotate
Patch0:  %name-1.2.3-alt-fix_config_path.patch
Patch1:  %name-1.2.3-alt-use_locale.patch
Patch2:  %name-1.2.3-alt-Werror.patch
Patch3:  %name-1.2.3-alt-fix_repocop_tmp_warn.patch
Patch4:  %name-1.2.3-alt-config_line_length.patch
Patch5:  %name-1.2.3-alt-fix_format_truncation.patch

BuildRequires(pre): rpm-build-licenses
Requires(pre): shadow-utils
Requires:  xinetd

%description
ftp.proxy  is an application level gateway for FTP. It sits between a
client and a server forwarding command and  data streams supporting a
subset of the file transfer protocol as described in RFC 959.
Beside this basic function which makes the program useful on firewall
or masqueraders it offers fixing the FTP server (e.g. for connections
into a protected LAN) and proxy authentication.

%define confdir %_sysconfdir/%name
%define scriptdir %_datadir/%name
%define logdir %_logdir/%name

%define username _ftpproxy

%prep
%setup -q
%patch0 -p0
%patch1 -p0
%patch2 -p0
%patch3 -p0
%patch4 -p0
%patch5 -p0

# Replacing license file with reference

mv -f -- LICENSE LICENSE.orig
ln -s -- $(relative %_licensedir/GPL-2 %_docdir/%name/LICENSE) LICENSE

%build
subst 's/-ggdb/-Werror -pipe/' src/Makefile
%make_build

%install
install -pD -m0755 -- src/ftp.proxy %buildroot/%_sbindir/ftp.proxy
install -pD -m0644 -- doc/ftp.proxy.1 %buildroot/%_man1dir/ftp.proxy.1
install -pD -m0644 -- %SOURCE1 %buildroot/%confdir/%name.conf
install -pD -m0644 -- samples/proxy-user.conf %buildroot/%confdir/proxy-user.conf
install -pD -m0640 -- %SOURCE2 %buildroot/%_sysconfdir/xinetd.d/%name
install -pD -m0755 -- samples/operator.ctp %buildroot/%scriptdir/ctp.awk
install -pD -m0644 -- %SOURCE3 %buildroot/%_sysconfdir/logrotate.d/%name

mkdir -p -- %buildroot/%logdir/

subst 's# at user at #%{username}#g' %buildroot/%_sysconfdir/xinetd.d/%name
subst 's# at bindir at #%{_sbindir}#g' %buildroot/%_sysconfdir/xinetd.d/%name
subst 's# at confdir at #%{confdir}#g' %buildroot/%_sysconfdir/xinetd.d/%name
subst 's# at appname at #%{name}#g' %buildroot/%_sysconfdir/xinetd.d/%name

subst 's# at scriptdir at #%{scriptdir}#g' %buildroot/%confdir/%name.conf
subst 's# at logdir at #%{logdir}#g' %buildroot/%confdir/%name.conf \
%buildroot/%_sysconfdir/logrotate.d/%name

%pre
%_sbindir/groupadd -r -f %username 2>/dev/null ||:
%_sbindir/useradd  -r -g %username -c 'ftpproxy service' \
-d /var/empty -s /dev/null %username 2>/dev/null ||:

%files
%doc HISTORY INSTALL samples
%doc --no-dereference LICENSE

%_sbindir/ftp.proxy
%scriptdir/*

%_man1dir/ftp.proxy*

%attr(0750,root,%username) %dir %confdir
%attr(1770,root,%username) %dir %logdir

%config(noreplace) %confdir/*.conf
%config(noreplace) %_sysconfdir/xinetd.d/%name
%config %_sysconfdir/logrotate.d/%name

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin