syslog-ng.spec 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. ##
  2. ## syslog-ng.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package version
  26. %define V_sl_major 1.6
  27. %define V_sl_minor 2
  28. %define V_ol_major 0.3
  29. %define V_ol_minor 13
  30. # package information
  31. Name: syslog-ng
  32. Summary: Syslog Daemon
  33. URL: http://www.balabit.com/products/syslog_ng/
  34. Vendor: Balázs Scheidler
  35. Packager: The OpenPKG Project
  36. Distribution: OpenPKG
  37. Class: PLUS
  38. Group: System
  39. License: GPL
  40. Version: %{V_sl_major}.%{V_sl_minor}
  41. Release: 20040311
  42. # list of sources
  43. Source0: http://www.balabit.com/downloads/syslog-ng/%{V_sl_major}/src/syslog-ng-%{V_sl_major}.%{V_sl_minor}.tar.gz
  44. Source1: http://www.balabit.com/downloads/libol/%{V_ol_major}/libol-%{V_ol_major}.%{V_ol_minor}.tar.gz
  45. Source2: rc.syslog-ng
  46. Source3: syslog-ng.conf
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 20040130, flex, gcc
  51. PreReq: OpenPKG, openpkg >= 20040130
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. syslog-ng is a syslogd(8) replacement, but with new functionality
  56. for the new generation. The original syslogd allows messages only
  57. to be sorted based on priority/facility pairs; syslog-ng adds the
  58. possibility to filter based on message contents using regular
  59. expressions. The new configuration scheme is intuitive and powerful.
  60. Forwarding logs over TCP and remembering all forwarding hops makes
  61. it ideal for firewalled environments.
  62. %track
  63. prog syslog-ng:libol = {
  64. version = %{V_ol_major}.%{V_ol_minor}
  65. url = http://www.balabit.com/downloads/libol/
  66. regex = (0\.\d+)
  67. url = http://www.balabit.com/downloads/libol/__NEWVER__/
  68. regex = libol-(__VER__)\.tar\.gz
  69. }
  70. prog syslog-ng:syslog-ng = {
  71. version = %{V_sl_major}.%{V_sl_minor}
  72. url = http://www.balabit.com/downloads/syslog-ng/
  73. regex = (1\.[6-8])
  74. url = http://www.balabit.com/downloads/syslog-ng/__NEWVER__/src/
  75. regex = syslog-ng-(__VER__)\.tar\.gz
  76. }
  77. %prep
  78. %setup -q
  79. %setup -q -T -D -a 1
  80. %build
  81. # configure and build libol
  82. ( cd libol-%{V_ol_major}.%{V_ol_minor}
  83. CC="%{l_cc}" \
  84. CFLAGS="%{l_cflags -O}" \
  85. CPPFLAGS="%{l_cppflags}" \
  86. LDFLAGS="%{l_ldflags}" \
  87. ./configure \
  88. --prefix=%{l_prefix} \
  89. --disable-shared
  90. %{l_make} %{l_mflags -O}
  91. ) || exit $?
  92. # configure and build syslog-ng
  93. %{l_shtool} subst \
  94. -e 's;ACLOCAL=aclocal;ACLOCAL=true;g' \
  95. -e 's;AUTOCONF=autoconf;AUTOCONF=true;;' \
  96. -e 's;AUTOMAKE=automake;AUTOMAKE=true;;' \
  97. -e 's;AUTOHEADER=autoheader;AUTOHEADER=true;;' \
  98. -e 's;MAKEINFO=makeinfo;MAKEINFO=true;;' \
  99. configure
  100. CC="%{l_cc}" \
  101. CFLAGS="%{l_cflags -O}" \
  102. CPPFLAGS="%{l_cppflags}" \
  103. LDFLAGS="%{l_ldflags}" \
  104. ./configure \
  105. --prefix=%{l_prefix} \
  106. --with-libol="`pwd`/libol-%{V_ol_major}.%{V_ol_minor}"
  107. %{l_make} %{l_mflags -O}
  108. %install
  109. # install syslog-ng
  110. rm -rf $RPM_BUILD_ROOT
  111. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  112. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
  113. # install additional files
  114. %{l_shtool} mkdir -f -p -m 755 \
  115. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  116. $RPM_BUILD_ROOT%{l_prefix}/etc/syslog-ng \
  117. $RPM_BUILD_ROOT%{l_prefix}/share/syslog-ng \
  118. $RPM_BUILD_ROOT%{l_prefix}/var/syslog-ng
  119. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  120. %{SOURCE rc.syslog-ng} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  121. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  122. %{SOURCE syslog-ng.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/syslog-ng/
  123. %{l_gzip} -d -c doc/sgml/syslog-ng.html.tar.gz | %{l_tar} xf -
  124. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  125. syslog-ng.html/* $RPM_BUILD_ROOT%{l_prefix}/share/syslog-ng/
  126. # determine installation files
  127. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  128. %{l_files_std} \
  129. '%config %{l_prefix}/etc/syslog-ng/*'
  130. %files -f files
  131. %clean
  132. rm -rf $RPM_BUILD_ROOT