ircd.spec 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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: 20030708
  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
  49. PreReq: OpenPKG, openpkg >= 20030415
  50. BuildPreReq: zlib
  51. PreReq: zlib
  52. %if "%{with_fsl}" == "yes"
  53. BuildPreReq: fsl
  54. PreReq: fsl
  55. %endif
  56. AutoReq: no
  57. AutoReqProv: no
  58. %description
  59. This is the classical IRCnet daemon. It is the server program for
  60. the Internet Relay Chat (IRC) service. Its function is to serve
  61. the client program with messages and commands. All commands and
  62. user messages are passed directly to the server for processing and
  63. relaying to other server sites.
  64. %prep
  65. %setup -q -n irc%{version}
  66. %patch0 -p0
  67. case "%{l_target}" in
  68. *-freebsd* )
  69. %patch1 -p1
  70. ;;
  71. esac
  72. %build
  73. CC="%{l_cc}" \
  74. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  75. CPPFLAGS="-I%{l_prefix}/include" \
  76. LDFLAGS="-L%{l_prefix}/lib %{l_fsl_ldflags}" \
  77. LIBS="%{l_fsl_libs}" \
  78. ./configure \
  79. --prefix=%{l_prefix} \
  80. --sysconfdir=%{l_prefix}/etc/ircd \
  81. --libdir=%{l_prefix}/lib/ircd \
  82. --localstatedir=%{l_prefix}/var/ircd \
  83. --with-zlib-prefix=%{l_prefix} \
  84. --with-zlib \
  85. --disable-dsm
  86. ( cd *-*-*
  87. %{l_shtool} subst \
  88. -e 's;^#undef ZIP_LINKS;#define ZIP_LINKS;' \
  89. config.h
  90. %{l_make} %{l_mflags -O} server \
  91. ircd_dir=%{l_prefix} \
  92. ircd_conf_dir=%{l_prefix}/etc/ircd \
  93. ircd_var_dir=%{l_prefix}/var/ircd \
  94. ircd_log_dir=%{l_prefix}/var/ircd
  95. )
  96. %install
  97. rm -rf $RPM_BUILD_ROOT
  98. %{l_shtool} mkdir -f -p -m 755 \
  99. $RPM_BUILD_ROOT%{l_prefix}/var
  100. ( cd *-*-*
  101. %{l_make} %{l_mflags} install-server \
  102. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  103. ircd_dir=$RPM_BUILD_ROOT%{l_prefix} \
  104. ircd_conf_dir=$RPM_BUILD_ROOT%{l_prefix}/etc/ircd \
  105. ircd_var_dir=$RPM_BUILD_ROOT%{l_prefix}/var/ircd \
  106. ircd_log_dir=$RPM_BUILD_ROOT%{l_prefix}/var/ircd
  107. )
  108. mv $RPM_BUILD_ROOT%{l_prefix}/sbin/chkconf \
  109. $RPM_BUILD_ROOT%{l_prefix}/sbin/ircd-chkconf
  110. mv $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/example.conf \
  111. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.conf.sample
  112. %{l_shtool} install -c -m 644 %{SOURCE ircd.conf} \
  113. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.conf
  114. %{l_shtool} install -c -m 644 /dev/null \
  115. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.motd
  116. %{l_shtool} install -c -m 644 /dev/null \
  117. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.tune
  118. %{l_shtool} install -c -m 644 /dev/null \
  119. $RPM_BUILD_ROOT%{l_prefix}/var/ircd/ircd.log
  120. rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin
  121. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/irc.1
  122. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true
  123. # install run-command script
  124. %{l_shtool} mkdir -f -p -m 755 \
  125. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  126. %{l_shtool} install -c -m 755 \
  127. -e 's;@l_prefix@;%{l_prefix};g' \
  128. -e 's;@l_susr@;%{l_susr};g' \
  129. %{SOURCE rc.ircd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  130. # install OSSP fsl configuration
  131. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  132. %{l_shtool} install -c -m 644 \
  133. -e 's;@l_prefix@;%{l_prefix};g' \
  134. %{SOURCE fsl.ircd} \
  135. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  136. # determine installation files
  137. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  138. %{l_files_std} \
  139. '%not %dir %{l_prefix}/etc/fsl' \
  140. '%config %{l_prefix}/etc/fsl/fsl.ircd' \
  141. '%config %{l_prefix}/etc/ircd/*'
  142. %files -f files
  143. %clean
  144. rm -rf $RPM_BUILD_ROOT