%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define buildversion 0.9.6 Name: pyg Version: 0.9.7 Release: 2%{?dist} Summary: Bidirectional gateway between mail and news Group: Applications/Internet License: GPL # Upstream author Cosimo Alfarano abandoned program and it is now available # only as a Debian package URL: http://ftp.debian.org/debian/pool/main/p/pyg/pyg_0.9.6-4.1.tar.gz Source0: pyg-%{buildversion}.tar.bz2 Source1: pyg-debian.tar.bz2 Patch0: pyg-build.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python >= 2.1, flex, bison, python-devel %description Python Gateway Script from news to mail and vice versa. It is intended to be a full SMTP/NNTP rfc compliant gateway with whitelist manager. You will probably have to install a mail-transport-agent and/or news-transport-system package to manage SMTP/NNTP traffic. MTA is needed for mail2news service, since mail have to be processed on a box where pyg is installed. You can use a remote smtpserver for news2mail. News system is useful but not needed, since you can send articles to a remote SMTP server (ie: moderated NG) where is installed pyg, otherwise you will need it. It refers to rfc 822 (mail) and 850 (news). %prep %setup -q -n pyg-%{buildversion} %setup -q -D -a 1 -n pyg-%{buildversion} %patch0 -p1 -b .MC-build %build #make %{?_smp_mflags} LIBDIR=%{_libdir} make LIBDIR=%{_libdir} #CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} #%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{python_sitearch} mv $RPM_BUILD_ROOT%{_libdir}/pyg/wlp.so $RPM_BUILD_ROOT%{python_sitearch} %clean rm -rf $RPM_BUILD_ROOT ## make sure pyg executables have right permission #chmod 0755 $(debdestdir)/usr/bin/pygn2m #chmod 0755 $(debdestdir)/usr/bin/pygm2n # ## dh_fixperms doesn't fix perms in /usr/share/doc subdirs #find $(debdestdir)/usr/share/doc/$(package) -type d -exec chmod 0755 {} \; %files %defattr(-,root,root,-) %doc HOWTO TODO %doc examples %{_bindir}/pygn2m %{_bindir}/pygm2n %{_libdir}/pyg %{_mandir}/man1/pygm2n.1.gz %{_mandir}/man1/pygn2m.1.gz %{_mandir}/man5/whitelist.5.gz %{python_sitearch}/* %changelog * Fri May 25 2007 Matej Cepl - 0.9.7-2 - Now it should be multilib. * Fri Oct 12 2006 Matej Cepl - 0.9.7-1 - Initial attempt to package.