ircd.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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.3p2
  34. Release: 2
  35. # list of sources
  36. Source0: ftp://ftp.irc.org/irc/server/irc%{version}.tgz
  37. Source1: rc.ircd
  38. Source2: ircd.conf
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 0.9-33, zlib
  43. PreReq: OpenPKG, openpkg >= 0.9-33
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. ircII is the classical Unix IRC client.
  48. %prep
  49. %setup -q -n irc%{version}
  50. %build
  51. CC="%{l_cc}" \
  52. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  53. CPPFLAGS="-I%{l_prefix}/include" \
  54. LDFLAGS="-L%{l_prefix}/lib" \
  55. ./configure \
  56. --prefix=%{l_prefix} \
  57. --sysconfdir=%{l_prefix}/etc/ircd \
  58. --localstatedir=%{l_prefix}/var/ircd \
  59. --with-zlib \
  60. --disable-ip6 \
  61. --disable-dsm
  62. ( cd *-*-*
  63. %{l_make} %{l_mflags -O} all \
  64. ircd_conf_dir=%{l_prefix}/etc/ircd \
  65. ircd_var_dir=%{l_prefix}/var/ircd \
  66. ircd_log_dir=%{l_prefix}/var/ircd
  67. )
  68. %install
  69. rm -rf $RPM_BUILD_ROOT
  70. ( cd *-*-*
  71. %{l_make} %{l_mflags} install \
  72. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  73. ircd_conf_dir=$RPM_BUILD_ROOT%{l_prefix}/etc/ircd \
  74. ircd_var_dir=$RPM_BUILD_ROOT%{l_prefix}/var/ircd \
  75. ircd_log_dir=$RPM_BUILD_ROOT%{l_prefix}/var/ircd
  76. )
  77. mv $RPM_BUILD_ROOT%{l_prefix}/sbin/chkconf \
  78. $RPM_BUILD_ROOT%{l_prefix}/sbin/ircd-chkconf
  79. mv $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/example.conf \
  80. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.conf.sample
  81. %{l_shtool} install -c -m 644 %{SOURCE ircd.conf} \
  82. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.conf
  83. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  84. %{l_shtool} install -c -m 755 -e "s;@l_prefix@;%{l_prefix};g" \
  85. %{SOURCE rc.ircd} \
  86. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  87. %{l_shtool} install -c -m 644 /dev/null \
  88. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.motd
  89. %{l_shtool} install -c -m 644 /dev/null \
  90. $RPM_BUILD_ROOT%{l_prefix}/etc/ircd/ircd.tune
  91. %{l_shtool} install -c -m 644 /dev/null \
  92. $RPM_BUILD_ROOT%{l_prefix}/var/ircd/ircd.log
  93. rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin
  94. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/irc.1
  95. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2> /dev/null || true
  96. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  97. %{l_files_std} \
  98. '%config %{l_prefix}/etc/ircd/*'
  99. %files -f files
  100. %clean
  101. rm -rf $RPM_BUILD_ROOT