ircd.spec 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. ##
  2. ## ircd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.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 information
  26. Name: ircd
  27. Summary: IRCnet Internet Relay Chat (IRC) Server
  28. URL: http://www.irc.org/~irc/server/
  29. Vendor: Jarkko Oikarinen
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [BASE]
  32. Group: Network
  33. License: BSD
  34. Version: 2.10.3p3
  35. Release: 20030701
  36. # package options
  37. %option with_fsl yes
  38. # list of sources
  39. Source0: ftp://ftp.irc.org/irc/server/irc%{version}.tgz
  40. Source1: rc.ircd
  41. Source2: ircd.conf
  42. Source3: fsl.ircd
  43. Patch0: irc%{version}.patch
  44. Patch1: ircd.freebsd.patch
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20030415, zlib
  49. PreReq: OpenPKG, openpkg >= 20030415
  50. %if "%{with_fsl}" == "yes"
  51. BuildPreReq: fsl
  52. PreReq: fsl
  53. %endif
  54. AutoReq: no
  55. AutoReqProv: no
  56. %description
  57. This is the classical IRCnet daemon. It is the server program for
  58. the Internet Relay Chat (IRC) service. Its function is to serve
  59. the client program with messages and commands. All commands and
  60. user messages are passed directly to the server for processing and
  61. relaying to other server sites.
  62. %prep
  63. %setup -q -n irc%{version}
  64. %patch0 -p0
  65. case "%{l_target}" in
  66. *-freebsd* )
  67. %patch1 -p1
  68. ;;
  69. esac
  70. %build
  71. CC="%{l_cc}" \
  72. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  73. CPPFLAGS="-I%{l_prefix}/include" \
  74. LDFLAGS="-L%{l_prefix}/lib %{l_fsl_ldflags}" \
  75. LIBS="%{l_fsl_libs}" \
  76. ./configure \
  77. --prefix=%{l_prefix} \
  78. --sysconfdir=%{l_prefix}/etc/ircd \
  79. --libdir=%{l_prefix}/lib/ircd \
  80. --localstatedir=%{l_prefix}/var/ircd \
  81. --with-zlib-prefix=%{l_prefix} \
  82. --with-zlib \
  83. --disable-dsm
  84. ( cd *-*-*
  85. %{l_shtool} subst \
  86. -e 's;^#undef ZIP_LINKS;#define ZIP_LINKS;' \
  87. config.h
  88. %{l_make} %{l_mflags -O} server \
  89. ircd_dir=%{l_prefix} \
  90. ircd_conf_dir=%{l_prefix}/etc/ircd \
  91. ircd_var_dir=%{l_prefix}/var/ircd \
  92. ircd_log_dir=%{l_prefix}/var/ircd
  93. )
  94. %install
  95. rm -rf $RPM_BUILD_ROOT
  96. %{l_shtool} mkdir -f -p -m 755 \
  97. $RPM_BUILD_ROOT%{l_prefix}/var
  98. ( cd *-*-*
  99. %{l_make} %{l_mflags} install-server \
  100. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  101. ircd_dir=$RPM_BUILD_ROOT%{l_prefix} \
  102. ircd_conf_dir=$RPM_BUILD_ROOT%{l_prefix}/etc/ircd \
  103. ircd_var_dir=$RPM_BUILD_ROOT%{l_prefix}/var/ircd \
  104. ircd_log_dir=$RPM_BUILD_ROOT%{l_prefix}/var/ircd
  105. )
  106. mv $RPM_BUILD_ROOT%{l_prefix}/sbin/chkconf \
  107. $RPM_BUILD_ROOT%{l_prefix}/sbin/ircd-chkconf
  108. mv $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/example.conf \
  109. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.conf.sample
  110. %{l_shtool} install -c -m 644 %{SOURCE ircd.conf} \
  111. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.conf
  112. %{l_shtool} install -c -m 644 /dev/null \
  113. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.motd
  114. %{l_shtool} install -c -m 644 /dev/null \
  115. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.tune
  116. %{l_shtool} install -c -m 644 /dev/null \
  117. $RPM_BUILD_ROOT%{l_prefix}/var/ircd/ircd.log
  118. rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin
  119. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/irc.1
  120. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true
  121. # Creating run-command script
  122. %{l_shtool} mkdir -f -p -m 755 \
  123. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  124. %{l_shtool} install -c -m 755 \
  125. -e 's;@l_prefix@;%{l_prefix};g' \
  126. -e 's;@l_susr@;%{l_susr};g' \
  127. %{SOURCE rc.%{name}} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  128. # OSSP fake syslog library
  129. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  130. %{l_shtool} install -c -m 644 \
  131. -e 's;@l_prefix@;%{l_prefix};g' \
  132. %{SOURCE fsl.%{name}} \
  133. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  134. # determine installation files
  135. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  136. %{l_files_std} \
  137. '%not %dir %{l_prefix}/etc/fsl' \
  138. '%config %{l_prefix}/etc/fsl/fsl.%{name}' \
  139. '%config %{l_prefix}/etc/ircd/*'
  140. %files -f files
  141. %clean
  142. rm -rf $RPM_BUILD_ROOT