ircd.spec 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. ##
  2. ## ircd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: ircd
  26. Summary: Internet Relay Chat (IRC) Server
  27. URL: http://www.irc.org/~irc/server/
  28. Vendor: Jarkko Oikarinen
  29. Packager: The OpenPKG Project
  30. Distribution: OpenPKG [EXP]
  31. Group: IRC
  32. License: BSD
  33. Version: 2.10.3p3
  34. Release: %{l_branch}.0
  35. # list of sources
  36. Source0: ftp://ftp.irc.org/irc/server/irc%{version}.tgz
  37. Source1: rc.ircd
  38. Source2: ircd.conf
  39. Patch0: irc%{version}.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 0.9-33, zlib
  44. PreReq: OpenPKG, openpkg >= 0.9-33
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. ircd is the server (daemon) program for the Internet Relay Chat.
  49. The ircd is a server in that its function is to "serve" the client
  50. program ircII with messages and commands. All commands and user
  51. messages are passed directly to the ircd for processing and relaying
  52. to other ircd sites.
  53. %prep
  54. %setup -q -n irc%{version}
  55. %patch -p0
  56. %build
  57. CC="%{l_cc}" \
  58. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  59. CPPFLAGS="-I%{l_prefix}/include" \
  60. LDFLAGS="-L%{l_prefix}/lib" \
  61. ./configure \
  62. --prefix=%{l_prefix} \
  63. --sysconfdir=%{l_prefix}/etc/ircd \
  64. --libdir=%{l_prefix}/lib/ircd \
  65. --localstatedir=%{l_prefix}/var/ircd \
  66. --with-zlib-prefix=%{l_prefix} \
  67. --with-zlib \
  68. --disable-dsm
  69. ( cd *-*-*
  70. %{l_rpmtool} subst \
  71. 's;^#undef ZIP_LINKS;#define ZIP_LINKS;' \
  72. -- config.h
  73. %{l_make} %{l_mflags -O} server \
  74. ircd_dir=%{l_prefix} \
  75. ircd_conf_dir=%{l_prefix}/etc/ircd \
  76. ircd_var_dir=%{l_prefix}/var/ircd \
  77. ircd_log_dir=%{l_prefix}/var/ircd
  78. )
  79. %install
  80. rm -rf $RPM_BUILD_ROOT
  81. ( cd *-*-*
  82. %{l_make} %{l_mflags} install-server \
  83. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  84. ircd_dir=$RPM_BUILD_ROOT%{l_prefix} \
  85. ircd_conf_dir=$RPM_BUILD_ROOT%{l_prefix}/etc/ircd \
  86. ircd_var_dir=$RPM_BUILD_ROOT%{l_prefix}/var/ircd \
  87. ircd_log_dir=$RPM_BUILD_ROOT%{l_prefix}/var/ircd
  88. )
  89. mv $RPM_BUILD_ROOT%{l_prefix}/sbin/chkconf \
  90. $RPM_BUILD_ROOT%{l_prefix}/sbin/ircd-chkconf
  91. mv $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/example.conf \
  92. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.conf.sample
  93. %{l_shtool} install -c -m 644 %{SOURCE ircd.conf} \
  94. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.conf
  95. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  96. %{l_shtool} install -c -m 755 -e "s;@l_prefix@;%{l_prefix};g" \
  97. %{SOURCE rc.ircd} \
  98. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  99. %{l_shtool} install -c -m 644 /dev/null \
  100. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.motd
  101. %{l_shtool} install -c -m 644 /dev/null \
  102. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.tune
  103. %{l_shtool} install -c -m 644 /dev/null \
  104. $RPM_BUILD_ROOT%{l_prefix}/var/ircd/ircd.log
  105. rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin
  106. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/irc.1
  107. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2> /dev/null || true
  108. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  109. %{l_files_std} \
  110. '%config %{l_prefix}/etc/ircd/*'
  111. %files -f files
  112. %clean
  113. rm -rf $RPM_BUILD_ROOT