ircd.spec 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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: 20020320
  36. # list of sources
  37. Source0: ftp://ftp.irc.org/irc/server/irc%{version}.tgz
  38. Source1: rc.ircd
  39. Source2: ircd.conf
  40. Patch0: irc%{version}.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20020206, zlib
  45. PreReq: OpenPKG, openpkg >= 20020206
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. This is the classical IRCnet daemon. It is the server program for
  50. the Internet Relay Chat (IRC) service. Its function is to serve
  51. the client program with messages and commands. All commands and
  52. user messages are passed directly to the server for processing and
  53. relaying to other server sites.
  54. %prep
  55. %setup -q -n irc%{version}
  56. %patch -p0
  57. %build
  58. CC="%{l_cc}" \
  59. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  60. CPPFLAGS="-I%{l_prefix}/include" \
  61. LDFLAGS="-L%{l_prefix}/lib" \
  62. ./configure \
  63. --prefix=%{l_prefix} \
  64. --sysconfdir=%{l_prefix}/etc/ircd \
  65. --libdir=%{l_prefix}/lib/ircd \
  66. --localstatedir=%{l_prefix}/var/ircd \
  67. --with-zlib-prefix=%{l_prefix} \
  68. --with-zlib \
  69. --disable-dsm
  70. ( cd *-*-*
  71. %{l_shtool} subst \
  72. -e 's;^#undef ZIP_LINKS;#define ZIP_LINKS;' \
  73. config.h
  74. %{l_make} %{l_mflags -O} server \
  75. ircd_dir=%{l_prefix} \
  76. ircd_conf_dir=%{l_prefix}/etc/ircd \
  77. ircd_var_dir=%{l_prefix}/var/ircd \
  78. ircd_log_dir=%{l_prefix}/var/ircd
  79. )
  80. %install
  81. rm -rf $RPM_BUILD_ROOT
  82. ( cd *-*-*
  83. %{l_make} %{l_mflags} install-server \
  84. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  85. ircd_dir=$RPM_BUILD_ROOT%{l_prefix} \
  86. ircd_conf_dir=$RPM_BUILD_ROOT%{l_prefix}/etc/ircd \
  87. ircd_var_dir=$RPM_BUILD_ROOT%{l_prefix}/var/ircd \
  88. ircd_log_dir=$RPM_BUILD_ROOT%{l_prefix}/var/ircd
  89. )
  90. mv $RPM_BUILD_ROOT%{l_prefix}/sbin/chkconf \
  91. $RPM_BUILD_ROOT%{l_prefix}/sbin/ircd-chkconf
  92. mv $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/example.conf \
  93. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.conf.sample
  94. %{l_shtool} install -c -m 644 %{SOURCE ircd.conf} \
  95. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.conf
  96. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  97. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  98. %{SOURCE rc.ircd} \
  99. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  100. %{l_shtool} install -c -m 644 /dev/null \
  101. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.motd
  102. %{l_shtool} install -c -m 644 /dev/null \
  103. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.tune
  104. %{l_shtool} install -c -m 644 /dev/null \
  105. $RPM_BUILD_ROOT%{l_prefix}/var/ircd/ircd.log
  106. rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin
  107. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/irc.1
  108. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2> /dev/null || true
  109. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  110. %{l_files_std} \
  111. '%config %{l_prefix}/etc/ircd/*'
  112. %files -f files
  113. %clean
  114. rm -rf $RPM_BUILD_ROOT