ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Sergey Degtyaryov <maga@sovesti.net>
To: community@altlinux.ru
Subject: [Comm] spec files
Date: Mon, 05 May 2003 12:08:29 +0400
Message-ID: <3EB61BFD.1000008@sovesti.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]

Доброго дня.

Решил немного поучиться собирать RPM. Несложные вещи вроде получаются, 
собрал spamprobe, о котором недавно писали на lrn, взялся за 
spamassassin. Спек описывает три пакета -- perl-овые модули, сам фильтр 
и документацию. Собирается все, да, но есть проблема с 
perl-mail-spamassassin.
Если вкратце -- он требует для установки самого себя.
Спек прилагаю. (никакой отсебятины, кроме перевода, там, вроде, нет)
Вот так полученный perl-mail-spamassassin описывается apt-cache после 
попадания в репозиторий:

[maga@home athlon]$ apt-cache show spamassassin
<skip>
Pre-Depends: /sbin/chkconfig, /bin/sh, /bin/sh, 
rpmlib(PayloadFilesHavePrefix) (<= 4.0-1), rpmlib(CompressedFileNames) 
(<= 3.0.4-1)
Depends: perl-Mail-SpamAssassin (= 2.53-1), coreutils, libc.so.6, 
libc.so.6(GLIBC_2.0), libc.so.6(GLIBC_2.1.3), libcrypto.so.0, 
libdl.so.2, libssl.so.0, perl(Config.pm), perl(Errno.pm), 
perl(File/Path.pm), perl(File/Spec.pm), perl(Getopt/Long.pm), 
perl(IO/Handle.pm), perl(IO/Pipe.pm), perl(IO/Socket.pm), 
perl(Mail/SpamAssassin.pm), perl(Mail/SpamAssassin/CmdLearn.pm), 
perl(Mail/SpamAssassin/DBBasedAddrList.pm), 
perl(Mail/SpamAssassin/NoMailAudit.pm), perl(POSIX.pm), 
perl(Pod/Usage.pm), perl(Sys/Syslog.pm), perl(lib.pm), perl(strict.pm), 
perl(vars.pm), perl-base, sh
Provides: libspamc.so, spamassassin (= 2.53-1)
<skip>

Все Mail/SpamAssassin/* -- это файлы этого пакета.
К тому же он не видит и HTML::Parser, к примеру.

[maga@home athlon]$ sudo rpm -U perl-Mail-SpamAssassin-2.53-1.athlon.rpm
ошибка: неудовлетворенные зависимости:
	perl(Pod::Usage) нужен для perl-Mail-SpamAssassin-2.53-1
	perl(HTML::Parser) нужен для perl-Mail-SpamAssassin-2.53-1
<skip>
[maga@home athlon]$ rpm -q perl-HTML-Parser
perl-HTML-Parser-3.26-alt2

Вот так.
Что посоветуете?

-- 
С уважением, Сергей Дегтярев
XMMS : Adrian Sherwood - Strange Turn

[-- Attachment #2: spamassassin.spec --]
[-- Type: text/plain, Size: 9963 bytes --]

# includes some tricks from the RPM wizards at PLD:
# http://cvs.pld.org.pl/SPECS/spamassassin.spec
# namely, making the tools RPM for masses, sql, and tools, and
# the perl-Mail-SpamAssassin rpm for the modules only.

# %include        /usr/lib/rpm/macros

%define perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo "$installarchlib")
%define perl_sitelib %(eval "`%{__perl} -V:installsitelib`"; echo "$installsitelib")
%define perl_sitearch %(eval "`%{__perl} -V:installsitearch`"; echo "$installsitearch")

# %define perl_sitelib	/usr/lib/perl5/site_perl
%define pdir    Mail
%define pnam    SpamAssassin

Summary:        a spam filter for email which can be invoked from mail delivery agents
Summary(pl):    Filtr antyspamowy, przeznaczony dla programów dostarczaj±cych pocztê (MDA)
Summary(ru):    æÉÌØÔÒ ÓÐÁÍÁ, ×ÙÚÙ×ÁÅÍÙÊ ÉÚ MDA

Group:        Networking/Mail
%define version 2.53
%define real_version 2.53
%define release mgd1

%define name    spamassassin
%define initdir %{_initrddir}

Name: %{name}
Version: %{version}
Release: %{release}
License: Artistic
URL: http://spamassassin.org/
Source: http://spamassassin.org/released/Mail-SpamAssassin-%{real_version}.tar.gz
Buildroot: %{_tmppath}/%{name}-root
Prefix: %{_prefix}
Prereq: /sbin/chkconfig
Requires: perl-Mail-SpamAssassin = %{version}-%{release}
Distribution: SpamAssassin

%define __find_provides /usr/lib/rpm/find-provides
%define __find_requires /usr/lib/rpm/find-requires

%description
SpamAssassin provides you with a way to reduce, if not completely eliminate,
Unsolicited Bulk Email (or "spam") from your incoming email.  It can be
invoked by a MDA such as sendmail or postfix, or can be called from a procmail
script, .forward file, etc.  It uses a genetic-algorithm-evolved scoring system
to identify messages which look spammy, then adds headers to the message so
they can be filtered by the user's mail reading software.  This distribution
includes the spamd/spamc components which considerably speeds processing of
mail.

%description -l pl
SpamAssassin udostêpnia Ci mo¿liwo¶æ zredukowania, je¶li nie
kompletnego wyeliminowania Niezamawianej Komercyjnej Poczty
(Unsolicited Bulk Email, spamu) z Twojej poczty. Mo¿e byæ
wywo³ywany z MDA, np. Sendmaila czy Postfixa, lub z pliku ~/.forward
itp. U¿ywa ogólnego algorytmu oceniania w celu identyfikacji
wiadomo¶ci, które wygl±daj± na spam, po czym dodaje nag³ówki do
wiadomo¶ci, umo¿liwiaj±c filtrowanie przez oprogramowanie u¿ytkownika.
Ta dystrybucja zawiera programy spamd/spamc, umo¿liwiaj±ce
uruchomienie serwera, co znacznie przyspieszy proces przetwarzania
poczty.

%description -l ru
SpamAssassin ÐÒÅÄÏÓÔÁ×ÌÑÅÔ ×ÏÚÍÏÖÎÏÓÔØ ÏÔÍÅÔÉÔØ ÎÅÖÅÌÁÔÅÌØÎÕÀ ÐÏÞÔÕ,
ÉÚ×ÅÓÔÎÕÀ ËÁË ÓÐÁÍ. SpamAssassin ×ÙÚÙ×ÁÅÔÓÑ ÉÚ MDA, ÔÁËÉÈ, ËÁË postfix
ÉÌÉ sendmail. ÷ÏÚÍÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÞÅÒÅÚ procmail, .forward É Ô.Ä.
SpamAssassin, ÒÁÓÐÏÚÎÁ× ÓÐÁÍ, ÄÏÂÁ×ÌÑÅÔ × ÐÉÓØÍÏ ÚÁÇÏÌÏ×ËÉ, ËÏÔÏÒÙÅ
ÍÏÇÕÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÙ × ÐÏÞÔÏ×ÙÈ ËÌÉÅÎÔÁÈ É ÄÒÕÇÏÍ ÐÒÏÇÒÁÍÍÎÏÍ
ÏÂÅÓÐÅÞÅÎÉÉ. ôÁËÖÅ ÓÏÄÅÒÖÉÔ spamd É spamc -- ÓÅÒ×ÅÒ É ËÌÉÅÎÔ, ÕÓËÏÒÑÀÝÉÅ
ÐÒÏ×ÅÒËÕ ÂÏÌØÛÉÈ ÏÂßÅÍÏ× ÐÏÞÔÙ.


%package tools
Summary:        Miscellaneous tools and documentation for SpamAssassin
Summary(pl):    Przeró¿ne narzêdzia zwi±zane z SpamAssassin
Summary(ru):    õÔÉÌÉÔÙ É ÄÏËÕÍÅÎÔÁÃÉÑ ÄÌÑ SpamAssassin
Group:          Networking/Mail
Requires: perl-Mail-SpamAssassin = %{version}-%{release}

%description tools
Miscellaneous tools and documentation from various authors, distributed
with SpamAssassin.  See /usr/share/doc/SpamAssassin-tools-*/.

%description tools -l pl
Przeró¿ne narzêdzia, dystrybuowane razem z SpamAssassin. Zobacz
/usr/share/doc/SpamAssassin-tools-*/.

%description tools -l pl
òÁÚÌÉÞÎÙÅ ÉÎÓÔÒÕÍÅÎÔÙ É ÄÏËÕÍÅÎÔÁÃÉÑ ÏÔ ÒÁÚÎÙÈ Á×ÔÏÒÏ×.
óÍ. /usr/share/doc/SpamAssassin-tools-*/.


%package -n perl-Mail-SpamAssassin
Summary:        %{pdir}::%{pnam} -- SpamAssassin e-mail filter Perl modules
Summary(pl):    %{pdir}::%{pnam} -- modu³y Perla filtru poczty SpamAssassin
Summary(ru):    %{pdir}::%{pnam} -- íÏÄÕÌÉ perl ÄÌÑ SpamAssassin
Requires: perl >= 5.004 perl(Pod::Usage) perl(HTML::Parser)
Group:          Development/Libraries

%description -n perl-Mail-SpamAssassin
Mail::SpamAssassin is a module to identify spam using text analysis and
several internet-based realtime blacklists. Using its rule base, it uses a
wide range of heuristic tests on mail headers and body text to identify
``spam'', also known as unsolicited commercial email. Once identified, the
mail can then be optionally tagged as spam for later filtering using the
user's own mail user-agent application.

%description -n perl-Mail-SpamAssassin -l pl
Mail::SpamAssassin jest pluginem dla Mail::Audit, s³u¿±cym do
identyfikacji spamu przy u¿yciu analizy zawarto¶ci i/lub internetowych
czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
zakres testów heurystycznych na nag³ówkach i tre¶ci, posi³kuj±c siê
stworzon± wcze¶niej baz± regu³. Po zidentyfikowaniu, poczta mo¿e byæ
oznaczona jako spam w celu pó¼niejszego wyfiltrowania, np. przy u¿yciu
aplikacji do czytania poczty.


%description -n perl-Mail-SpamAssassin -l ru
Mail::SpamAssassin -- ÍÏÄÕÌØ perl ÄÌÑ ÏÐÒÅÄÅÌÅÎÉÑ ÓÐÁÍÁ, ÉÓÐÏÌØÚÕÑ ÁÎÁÌÉÚ
ÔÅËÓÔÁ É ÓÔÏÐ-ÌÉÓÔÙ × ÉÎÔÅÒÎÅÔ.


%prep
%setup -q -n %{pdir}-%{pnam}-%{real_version}

%build
%{__perl} Makefile.PL INST_PREFIX=%{_prefix} INST_SYSCONFDIR=%{_sysconfdir} PREFIX=$RPM_BUILD_ROOT/%{_prefix} SYSCONFDIR=$RPM_BUILD_ROOT/%{_sysconfdir} < /dev/null
# now override the PREFIX setting to not use %buildroot%. MakeMaker
# does not have a better way to do this, it seems...
%{__make} PREFIX=%{_prefix}
%{__make} spamd/libspamc.so
# make test

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%makeinstall PREFIX=%buildroot/%{_prefix} \
        INSTALLMAN1DIR=%buildroot/%{_mandir}/man1 \
	INSTALLMAN3DIR=%buildroot/%{_mandir}/man3 \
	INSTALLSITEMAN1DIR=%buildroot/%{_mandir}/man1 \
	INSTALLSITEMAN3DIR=%buildroot/%{_mandir}/man3 \
	INSTALLVENDORMAN1DIR=%buildroot/%{_mandir}/man1 \
	INSTALLVENDORMAN3DIR=%buildroot/%{_mandir}/man3
install -d %buildroot/%{initdir}
install -d %buildroot/%{_includedir}
install -m 0755 spamd/redhat-rc-script.sh %buildroot/%{initdir}/spamassassin
install -m 0644 spamd/libspamc.so %buildroot/%{_libdir}
install -m 0644 spamd/libspamc.h %buildroot/%{_includedir}/libspamc.h

mkdir -p %{buildroot}/etc/mail/spamassassin

[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress

%files 
%defattr(-,root,root)
%doc README Changes sample-nonspam.txt sample-spam.txt spamd/README.spamd INSTALL
%attr(755,root,root) %{_bindir}/*
%attr(644,root,root) %{_includedir}/*
%attr(644,root,root) %{_libdir}/*.so
%config(noreplace) %attr(755,root,root) %{initdir}/spamassassin
%{_mandir}/man1/*

%files tools
%defattr(644,root,root,755)
%doc sql tools masses contrib

%files -n perl-Mail-SpamAssassin
%defattr(644,root,root,755)
%{perl_sitelib}/*
%config(noreplace) %{_sysconfdir}/mail/spamassassin
%{_datadir}/spamassassin
%{_mandir}/man3/*

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%post
if [ $1 = 1 ]; then
        /sbin/chkconfig --add spamassassin
fi
/sbin/service spamassassin condrestart

%preun
if [ $1 = 0 ]; then
	/sbin/service spamassassin stop
        /sbin/chkconfig --del spamassassin
fi

%changelog
* Thu Apr 03 2003 Theo Van Dinter <felicity@kluge.net> 2.53-1
- updated to 2.53

* Mon Mar 24 2003 Theo Van Dinter <felicity@kluge.net> 2.52-1
- updated to 2.52

* Thu Mar 13 2003 Theo Van Dinter <felicity@kluge.net> 2.51-1
- updated to 2.51

* Tue Feb 25 2003 Theo Van Dinter <felicity@kluge.net> -3
- changed "make install" call to properly set where the man pages go.
  Fixes oddities between MakeMaker and RPM.  <grumble>

* Tue Feb 25 2003 Theo Van Dinter <felicity@kluge.net> -2
- put in a patch to fix dependency problems with RPM 4.1

* Thu Feb 20 2003 Theo Van Dinter <felicity@kluge.net> 2.50-1
- upgraded to real 2.50 release

* Sun Feb 02 2003 Theo Van Dinter <felicity@kluge.net>
- instead of us trying to do a restart, call service condrestart to do
  it for us. :)

* Wed Dec 18 2002 Justin Mason <jm-spec@jmason.org>
- fixed specfile to work with Duncan's new Makefile.PL changes

* Tue Sep 18 2002 Justin Mason <jm-spec@jmason.org>
- merged 3-package system from b2_4_0 into 2.5x development

* Tue Sep 11 2002 Justin Mason <jm-spec@jmason.org>
- merged Michael Brown's libspamc support into 2.50 specfile
- made "perl Makefile.PL" read from /dev/null to avoid interactivity issues

* Mon Sep 10 2002 Michael Brown <michaelb@opentext.com>
- Added building, installation and packaging of libspamc.{h,so}

* Tue Sep 03 2002 Theo Van Dinter <felicity@kluge.net>
- added INSTALL to documentation files
- install man pages via _manpage macro to make things consistent
- added perl requires statement
- cleaned out some cruft
- fixed "file listed twice" bug

* Wed Aug 28 2002 Justin Mason <jm-spec@jmason.org>
- merged code from PLD rpm, split into spamassassin, perl-Mail-SpamAssassin,
  and spamassassin-tools rpms

* Mon Jul 29 2002 Justin Mason <jm-spec@jmason.org>
- removed migrate_cfs code, obsolete

* Thu Jul 25 2002 Justin Mason <jm-spec@jmason.org>
- removed findbin patch, obsolete

* Fri Apr 19 2002 Theo Van Dinter <felicity@kluge.net>
- Updated for 2.20 release
- made /etc/mail/spamassassin a config directory so local.cf doesn't get wiped out
- added a patch to remove findbin stuff

* Wed Feb 27 2002 Craig Hughes <craig@hughes-family.org>
- Updated for 2.1 release

* Sat Feb 02 2002 Theo Van Dinter <felicity@kluge.net>
- Updates for 2.01 release
- Fixed rc file
- RPM now buildable as non-root
- fixed post_service errors
- fixed provides to include perl modules
- use file find instead of manually specifying files

* Tue Jan 15 2002 Craig Hughes <craig@hughes-family.org>
- Updated for 2.0 release

* Wed Dec 05 2001 Craig Hughes <craig@hughes-family.org>
- Updated for final 1.5 distribution.

* Sun Nov 18 2001 Craig Hughes <craig@hughes-family.org>
- first version of rpm.


             reply	other threads:[~2003-05-05  8:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-05  8:08 Sergey Degtyaryov [this message]
2003-05-05  9:53 ` Valentin Nechayev
2003-05-05 10:32   ` Sergey Degtyaryov
2003-05-06 16:29     ` [Comm] " Alexey Tourbin
2003-05-06 19:59       ` Andrey Mackiewicz
2003-05-06 20:31         ` Alexey Tourbin
2003-05-06  1:04 ` Michael Shigorin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EB61BFD.1000008@sovesti.net \
    --to=maga@sovesti.net \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git