| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- ##
- ## syslog-ng.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package version
- %define V_sl_major 1.6
- %define V_sl_minor 2
- %define V_ol_major 0.3
- %define V_ol_minor 13
- # package information
- Name: syslog-ng
- Summary: Syslog Daemon
- URL: http://www.balabit.com/products/syslog_ng/
- Vendor: Balázs Scheidler
- Packager: The OpenPKG Project
- Distribution: OpenPKG
- Class: PLUS
- Group: System
- License: GPL
- Version: %{V_sl_major}.%{V_sl_minor}
- Release: 20040311
- # list of sources
- Source0: http://www.balabit.com/downloads/syslog-ng/%{V_sl_major}/src/syslog-ng-%{V_sl_major}.%{V_sl_minor}.tar.gz
- Source1: http://www.balabit.com/downloads/libol/%{V_ol_major}/libol-%{V_ol_major}.%{V_ol_minor}.tar.gz
- Source2: rc.syslog-ng
- Source3: syslog-ng.conf
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, flex, gcc
- PreReq: OpenPKG, openpkg >= 20040130
- AutoReq: no
- AutoReqProv: no
- %description
- syslog-ng is a syslogd(8) replacement, but with new functionality
- for the new generation. The original syslogd allows messages only
- to be sorted based on priority/facility pairs; syslog-ng adds the
- possibility to filter based on message contents using regular
- expressions. The new configuration scheme is intuitive and powerful.
- Forwarding logs over TCP and remembering all forwarding hops makes
- it ideal for firewalled environments.
- %track
- prog syslog-ng:libol = {
- version = %{V_ol_major}.%{V_ol_minor}
- url = http://www.balabit.com/downloads/libol/
- regex = (0\.\d+)
- url = http://www.balabit.com/downloads/libol/__NEWVER__/
- regex = libol-(__VER__)\.tar\.gz
- }
- prog syslog-ng:syslog-ng = {
- version = %{V_sl_major}.%{V_sl_minor}
- url = http://www.balabit.com/downloads/syslog-ng/
- regex = (1\.[6-8])
- url = http://www.balabit.com/downloads/syslog-ng/__NEWVER__/src/
- regex = syslog-ng-(__VER__)\.tar\.gz
- }
- %prep
- %setup -q
- %setup -q -T -D -a 1
- %build
- # configure and build libol
- ( cd libol-%{V_ol_major}.%{V_ol_minor}
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- CPPFLAGS="%{l_cppflags}" \
- LDFLAGS="%{l_ldflags}" \
- ./configure \
- --prefix=%{l_prefix} \
- --disable-shared
- %{l_make} %{l_mflags -O}
- ) || exit $?
- # configure and build syslog-ng
- %{l_shtool} subst \
- -e 's;ACLOCAL=aclocal;ACLOCAL=true;g' \
- -e 's;AUTOCONF=autoconf;AUTOCONF=true;;' \
- -e 's;AUTOMAKE=automake;AUTOMAKE=true;;' \
- -e 's;AUTOHEADER=autoheader;AUTOHEADER=true;;' \
- -e 's;MAKEINFO=makeinfo;MAKEINFO=true;;' \
- configure
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- CPPFLAGS="%{l_cppflags}" \
- LDFLAGS="%{l_ldflags}" \
- ./configure \
- --prefix=%{l_prefix} \
- --with-libol="`pwd`/libol-%{V_ol_major}.%{V_ol_minor}"
- %{l_make} %{l_mflags -O}
- %install
- # install syslog-ng
- rm -rf $RPM_BUILD_ROOT
- %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
- strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
- # install additional files
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
- $RPM_BUILD_ROOT%{l_prefix}/etc/syslog-ng \
- $RPM_BUILD_ROOT%{l_prefix}/share/syslog-ng \
- $RPM_BUILD_ROOT%{l_prefix}/var/syslog-ng
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE rc.syslog-ng} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE syslog-ng.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/syslog-ng/
- %{l_gzip} -d -c doc/sgml/syslog-ng.html.tar.gz | %{l_tar} xf -
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- syslog-ng.html/* $RPM_BUILD_ROOT%{l_prefix}/share/syslog-ng/
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%config %{l_prefix}/etc/syslog-ng/*'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|