spegla.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. ##
  2. ## spegla.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://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: spegla
  26. Summary: FTP Mirroring Tool
  27. URL: ftp://subzero.campus.luth.se/pub/spegla/
  28. Vendor: Jens A Nilsson
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: EVAL
  32. Group: Network
  33. License: BSD
  34. Version: 1.1p4
  35. Release: 20060323
  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 >= 20040130
  49. PreReq: OpenPKG, openpkg >= 20040130
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. Spegla is fast mirroring tool for the File Transfer Protocol (FTP).
  54. %track
  55. prog spegla = {
  56. version = %{version}
  57. url = ftp://subzero.campus.luth.se/pub/spegla/
  58. regex = spegla-(__VER__)\.tar\.gz
  59. }
  60. %prep
  61. %setup -q
  62. %patch -p0
  63. %patch -p0 -P 1
  64. %build
  65. cp Makefile.linux Makefile
  66. %{l_shtool} subst \
  67. -e 's;gcc;$(CC);' \
  68. -e 's;^\(OBJS[ ]*=\);\1 regex/regcomp.o regex/regerror.o regex/regexec.o regex/regfree.o;' \
  69. Makefile
  70. for name in regex/regcomp regex/regerror regex/regexec regex/regfree; do
  71. echo "$name.o: $name.c" >>Makefile
  72. echo " \$(CC) \$(CFLAGS) -o $name.o $name.c \$(DEFS)" >>Makefile
  73. done
  74. CC="%{l_cc}"
  75. CFLAGS="%{l_cflags -O} -c"
  76. %if "%{with_ipv6}" == "yes"
  77. DEFS="-DINET6"
  78. %else
  79. DEFS=""
  80. %endif
  81. LDFLAGS=""
  82. case "%{l_platform -t}" in
  83. *-freebsd* ) DEFS="$DEFS -DFREEBSD"; LDFLAGS="$LDFLAGS -lcompat" ;;
  84. *-linux* ) DEFS="$DEFS -DLINUX" ;;
  85. *-sunos* ) DEFS="$DEFS -DSolaris -DMTYPES -DNOCDEFS -DPROGNAME=\\\"spegla\\\"" ;;
  86. esac
  87. %{l_make} %{l_mflags -O} \
  88. CC="$CC" CFLAGS="$CFLAGS" DEFS="$DEFS" LDFLAGS="$LDFLAGS"
  89. %install
  90. rm -rf $RPM_BUILD_ROOT
  91. %{l_shtool} mkdir -f -p -m 755 \
  92. $RPM_BUILD_ROOT%{l_prefix}/bin \
  93. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  94. $RPM_BUILD_ROOT%{l_prefix}/etc/spegla \
  95. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  96. $RPM_BUILD_ROOT%{l_prefix}/var/spegla/pkg
  97. %{l_shtool} install -c -s -m 755 \
  98. spegla $RPM_BUILD_ROOT%{l_prefix}/bin/
  99. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  100. %{SOURCE spegla-mirror} $RPM_BUILD_ROOT%{l_prefix}/bin/
  101. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  102. %{SOURCE spegla.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/spegla/
  103. %{l_shtool} install -c -m 644 \
  104. spegla.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  105. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  106. %{SOURCE rc.spegla} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  107. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  108. '%config %{l_prefix}/etc/spegla/*'
  109. %files -f files
  110. %clean
  111. rm -rf $RPM_BUILD_ROOT