Changeset 520 for spec/trunk/SPECS


Ignore:
Timestamp:
Feb 5, 2015, 5:06:14 PM (11 years ago)
Author:
Yuri Dario
Message:

spec: clamav, r1001, update of source code to 0.98.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spec/trunk/SPECS/clamav.spec

    r244 r520  
     1#define svn_url     F:/rd/ports/clamav/trunk
     2%define svn_url     http://svn.netlabs.org/repos/ports/clamav/trunk
     3%define svn_rev     1001
    14
    25Summary:        End-user tools for the Clam Antivirus scanner
    36Name:           clamav
    4 Version:        0.97.2
    5 Release:        5%{?dist}
     7Version:        0.98.6
     8Release:        6%{?dist}
    69
    710License:        proprietary
    811Group:          Applications/File
    912URL:            http://www.clamav.net
    10 Source0:        http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?snapshot}.tar.gz
     13
     14Source:         %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
    1115Source1:        clamd.ico
    1216Source2:        ClamAV_ReadMe.txt
    1317
    14 Patch1:         clamav-os2.diff
    15 
    1618BuildRoot:      %_tmppath/%name-%version-%release-root
    1719
    1820Requires:       clamav-lib = %version-%release
    19 Requires:       data(clamav)
    20 
    21 #BuildRequires: curl-devel
     21#Requires:      data(clamav)
     22
     23BuildRequires:  curl-devel
    2224BuildRequires:  zlib-devel bzip2-devel
    2325BuildRequires:  ncurses-devel
     
    2729Summary:        Dynamic libraries for the Clam Antivirus scanner
    2830Group:          System Environment/Libraries
    29 Requires:       data(clamav)
     31#Requires:      data(clamav)
    3032
    3133%package devel
     
    3436Requires:       clamav-lib        = %version-%release
    3537#Requires:      clamav-filesystem = %version-%release
    36 Requires(pre):  %_libdir/pkgconfig
    37 Requires:       pkgconfig
    3838
    3939%package data
     
    4545Conflicts:              data(clamav) < full
    4646Conflicts:              data(clamav) > full
    47 %{?noarch}
    48 
    49 %package data-empty
    50 Summary:        Empty data package for the Clam Antivirus scanner
    51 Group:          Applications/File
    52 Provides:       data(clamav) = empty
    53 Conflicts:      data(clamav) < empty
    54 Conflicts:      data(clamav) > empty
    5547%{?noarch}
    5648
     
    138130build applications using clamav.
    139131
     132
    140133%description data
    141 This package contains the virus-database needed by clamav. This
    142 database should be updated regularly; the 'clamav-update' package
    143 ships a corresponding cron-job. This package and the
    144 'clamav-data-empty' package are mutually exclusive.
    145 
    146 Use -data when you want a working (but perhaps outdated) virus scanner
    147 immediately after package installation.
    148 
    149 Use -data-empty when you are updating the virus database regulary and
    150 do not want to download a >5MB sized rpm-package with outdated virus
    151 definitions.
    152 
    153 
    154 %description data-empty
    155134This is an empty package to fulfill inter-package dependencies of the
    156 clamav suite. This package and the 'clamav-data' package are mutually
    157 exclusive.
    158 
    159 Use -data when you want a working (but perhaps outdated) virus scanner
    160 immediately after package installation.
    161 
    162 Use -data-empty when you are updating the virus database regulary and
    163 do not want to download a >5MB sized rpm-package with outdated virus
    164 definitions.
     135clamav suite.
    165136
    166137
     
    194165
    195166
     167%package debug
     168Summary: HLL debug data for exception handling support.
     169
     170%description debug
     171HLL debug data for exception handling support.
     172
    196173
    197174## ------------------------------------------------------------
    198175
    199176%prep
    200 %setup -q -n %{name}-%{version}
     177%if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
     178%setup -q
     179%else
     180%setup -n "%{name}-%{version}" -Tc
     181svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
     182rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
     183(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
     184%endif
    201185
    202186sed -e 's!_VERSION_!%version!g;' \
     
    204188    %{SOURCE2} > ReadMe.txt
    205189
    206 %patch1 -p1 -b .os2~
     190# restore symlinks
     191ln -sf ../libclamav/getaddrinfo.c clamdscan/getaddrinfo.c
     192ln -sf ../libclamav/getaddrinfo.c clamdtop/getaddrinfo.c
    207193
    208194#sed -ri \
     
    224210
    225211%build
    226 # YD use sh for libtool, bash fails!
    227 export CONFIG_SHELL="/@unixroot/usr/bin/sh"
    228212export CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations"
    229213export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
    230214export LIBS="-lurpo -lmmap -lpthread"
     215
     216export CONFIG_SITE=/@unixroot/usr/share/config.legacy
     217
    231218%configure \
    232219    --disable-milter \
    233220    --disable-rpath \
    234221    --with-dbdir=/@unixroot/var/lib/clamav \
     222    --with-xml=/@unixroot/usr \
     223    --with-openssl=/@unixroot/usr \
     224    --with-libcurl=/@unixroot/usr \
    235225    --with-zlib=/@unixroot/usr \
     226    --with-libjson=/@unixroot/usr \
    236227    --enable-languages=c --disable-ltdl-install --disable-fdpassing \
    237228    --disable-clamav \
    238229    --disable-check \
    239230    --disable-llvm \
    240     --enable-shared --disable-static \
    241     "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
     231    --enable-shared --disable-static
    242232
    243233# TODO: check periodically that CLAMAVUSER is used for freshclam only
     
    249239
    250240%install
    251 export CONFIG_SHELL="/@unixroot/usr/bin/sh"
    252241rm -rf "$RPM_BUILD_ROOT" _doc*
    253242make DESTDIR="$RPM_BUILD_ROOT" install
     
    258247#LogFile must be readable to submit stats
    259248sed -i 's!#LogFileUnlock yes!LogFileUnlock yes!g;' \
    260     $RPM_BUILD_ROOT%{_sysconfdir}/clamd.conf
     249    $RPM_BUILD_ROOT%{_sysconfdir}/clamd.conf.sample
    261250
    262251
     
    278267rm -f   ${RPM_BUILD_ROOT}%_libdir/clamunrar*
    279268
    280 #touch ${RPM_BUILD_ROOT}%homedir/daily.cld
    281 #touch ${RPM_BUILD_ROOT}%homedir/main.cld
     269mkdir -p $RPM_BUILD_ROOT%{_var}/lib/clamav
     270touch $RPM_BUILD_ROOT%{_var}/lib/clamav/daily.cld
     271touch $RPM_BUILD_ROOT%{_var}/lib/clamav/daily.cvd
     272touch $RPM_BUILD_ROOT%{_var}/lib/clamav/main.cld
     273touch $RPM_BUILD_ROOT%{_var}/lib/clamav/main.cvd
     274touch $RPM_BUILD_ROOT%{_var}/lib/clamav/bytecode.cld
     275touch $RPM_BUILD_ROOT%{_var}/lib/clamav/bytecode.cvd
     276touch $RPM_BUILD_ROOT%{_var}/lib/clamav/mirrors.dat
    282277
    283278
     
    376371%doc ReadMe.txt
    377372%doc docs/*.pdf
    378 %_bindir/*
     373%_bindir/*.exe
    379374%_mandir/man[15]/*
    380375%exclude %_bindir/clamav-config
     
    403398%files data
    404399%defattr(-,%username,%username,-)
    405 # use %%config to keep files which were updated by 'freshclam'
    406 # already. Without this tag, they would be overridden with older
    407 # versions whenever a new -data package is installed.
    408 %config %verify(not size md5 mtime) %{_var}/lib/clamav/*.cvd
    409 
    410 
    411 %files data-empty
    412 %defattr(-,%username,%username,-)
    413400%ghost %attr(0664,%username,%username) %{_var}/lib/clamav/*.cvd
     401%ghost %attr(0664,%username,%username) %{_var}/lib/clamav/*.cld
     402%ghost %attr(0664,%username,%username) %{_var}/lib/clamav/*.dat
    414403
    415404
     
    421410%_mandir/*/freshclam*
    422411#%pkgdatadir/freshclam-sleep
    423 %config(noreplace) %verify(not mtime)    %_sysconfdir/freshclam.conf
     412%config(noreplace) %verify(not mtime)    %_sysconfdir/freshclam.conf.sample
    424413#%config(noreplace) %verify(not mtime)    %_sysconfdir/logrotate.d/*
    425414#%config(noreplace) %_sysconfdir/cron.d/*
     
    427416
    428417#%ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog
    429 #%ghost %attr(0664,%username,%username) %homedir/*.cld
     418%ghost %attr(0664,%username,%username) %{_var}/lib/clamav/*.cld
     419%ghost %attr(0664,%username,%username) %{_var}/lib/clamav/*.cvd
     420%ghost %attr(0664,%username,%username) %{_var}/lib/clamav/*.dat
    430421
    431422
     
    436427#%doc _doc_server/*
    437428%_mandir/man[58]/clamd*
    438 %_sbindir/*
     429%_sbindir/*.exe
     430%_sbindir/*.ico
    439431#%pkgdatadir/clamd-wrapper
    440432#%dir %_sysconfdir/clamd.d
    441 %config(noreplace) %verify(not mtime)    %_sysconfdir/clamd.conf
     433%config(noreplace) %verify(not mtime)    %_sysconfdir/clamd.conf.sample
    442434
    443435
     
    464456%endif
    465457
     458%files debug
     459%defattr(-,root,root)
     460%{_bindir}/*.dbg
     461%{_libdir}/*.dbg
     462%{_sbindir}/*.dbg
    466463
    467464%changelog
     465* Thu Feb 05 2015 yd <yd@os2power.com> 0.98.6-6
     466- r1001, update of source code to 0.98.6.
     467
    468468* Thu Nov 24 2011 yd
    469469- fixed missing mmap check in build
Note: See TracChangeset for help on using the changeset viewer.