spegla.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ##
  2. ## spegla.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: spegla
  27. Summary: FTP Mirroring Tool
  28. URL: ftp://subzero.campus.luth.se/pub/spegla/
  29. Vendor: Jens A Nilsson
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EVAL]
  32. Group: Network
  33. License: BSD
  34. Version: 1.1p4
  35. Release: 20030103
  36. # package options
  37. %option with_ipv6 no
  38. # list of sources
  39. Source0: ftp://subzero.campus.luth.se/pub/spegla/spegla-%{version}.tar.gz
  40. Source1: spegla.conf
  41. Source2: spegla-mirror
  42. Source3: rc.spegla
  43. Patch0: spegla.patch
  44. Patch1: http://www.imasy.or.jp/~ume/ipv6/spegla-1.1p4-ipv6-20020129.diff.gz
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20030103
  49. PreReq: OpenPKG, openpkg >= 20030103
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. Spegla is fast mirroring tool for the File Transfer Protocol (FTP).
  54. %prep
  55. %setup -q
  56. %patch0 -p0
  57. %patch1 -p0
  58. cp regex/*.[ch] .
  59. %build
  60. cp Makefile.linux Makefile
  61. %{l_shtool} subst \
  62. -e 's;gcc;$(CC);' \
  63. -e 's;^\(OBJS[ ]*=\);\1 regcomp.o regerror.o regexec.o regfree.o;' \
  64. Makefile
  65. CC="%{l_cc}"
  66. CFLAGS="%{l_cflags -O} -c"
  67. %if "%{with_ipv6}" == "yes"
  68. DEFS="-DINET6"
  69. %else
  70. DEFS=""
  71. %endif
  72. LDFLAGS=""
  73. case "%{l_target}" in
  74. *-freebsd* ) DEFS="$DEFS -DFREEBSD"; LDFLAGS="$LDFLAGS -lcompat" ;;
  75. *-linux* ) DEFS="$DEFS -DLINUX" ;;
  76. *-solaris* ) DEFS="$DEFS -DSolaris -DMTYPES-DPROGNAME=\\\"spegla\\\"" ;;
  77. esac
  78. %{l_make} %{l_mflags -O} \
  79. CC="$CC" CFLAGS="$CFLAGS" DEFS="$DEFS" LDFLAGS="$LDFLAGS"
  80. %install
  81. rm -rf $RPM_BUILD_ROOT
  82. %{l_shtool} mkdir -f -p -m 755 \
  83. $RPM_BUILD_ROOT%{l_prefix}/bin \
  84. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  85. $RPM_BUILD_ROOT%{l_prefix}/etc/spegla \
  86. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  87. $RPM_BUILD_ROOT%{l_prefix}/var/spegla/pkg
  88. %{l_shtool} install -c -s -m 755 \
  89. spegla $RPM_BUILD_ROOT%{l_prefix}/bin/
  90. %{l_shtool} install -c -m 755 \
  91. -e 's;@l_prefix@;%{l_prefix};g' \
  92. %{SOURCE spegla-mirror} $RPM_BUILD_ROOT%{l_prefix}/bin/
  93. %{l_shtool} install -c -m 644 \
  94. -e 's;@l_prefix@;%{l_prefix};g' \
  95. %{SOURCE spegla.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/spegla/
  96. %{l_shtool} install -c -m 644 \
  97. spegla.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  98. %{l_shtool} install -c -m 644 \
  99. -e 's;@l_prefix@;%{l_prefix};g' \
  100. %{SOURCE rc.spegla} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  101. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  102. %files -f files
  103. %clean
  104. rm -rf $RPM_BUILD_ROOT