gift.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ##
  2. ## gift.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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: gift
  27. Summary: The giFT Internet File Sharing (Server Framework)
  28. URL: http://www.giftproject.org/
  29. Vendor: Josh Guilfoyle et al.
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: PLUS
  33. Group: Network
  34. License: GPL
  35. Version: 0.11.8
  36. Release: 20041117
  37. # package options
  38. %option with_imagemagick yes
  39. %option with_vorbis yes
  40. # list of sources
  41. Source0: http://osdn.dl.sourceforge.net/gift/gift-%{version}.tar.bz2
  42. Source1: gift.sh
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130, libtool, make, gcc
  47. PreReq: OpenPKG, openpkg >= 20040130
  48. BuildPreReq: file
  49. PreReq: file
  50. %if "%{with_imagemagick}" == "yes"
  51. BuildPreReq: imagemagick
  52. PreReq: imagemagick
  53. %endif
  54. %if "%{with_vorbis}" == "yes"
  55. BuildPreReq: vorbis-libs
  56. PreReq: vorbis-libs
  57. %endif
  58. AutoReq: no
  59. AutoReqProv: no
  60. %description
  61. giFT is an Internet File Sharing platform consisting of a server
  62. framework plus Peer-To-Peer (P2P) network backends to which giFT
  63. frontends can connect remotely.
  64. This package is the giFT Server Framework.
  65. %track
  66. prog gift = {
  67. version = %{version}
  68. url = http://prdownloads.sourceforge.net/gift/
  69. regex = gift-(__VER__)\.tar\.bz2
  70. }
  71. %prep
  72. %setup -q
  73. %build
  74. # configure program
  75. CC="%{l_cc}" \
  76. CFLAGS="%{l_cflags -O}" \
  77. CPPFLAGS="%{l_cppflags}" \
  78. LDFLAGS="%{l_ldflags}" \
  79. LIBS="`. %{l_prefix}/lib/libltdl.la; echo $dependency_libs`" \
  80. ./configure \
  81. --prefix=%{l_prefix} \
  82. --enable-libmagic \
  83. %if "%{with_imagemagick}" == "yes"
  84. --enable-imagemagick \
  85. --with-Magick=%{l_prefix} \
  86. %else
  87. --disable-imagemagick \
  88. %endif
  89. %if "%{with_vorbis}" == "yes"
  90. --enable-libvorbis \
  91. --with-vorbis=%{l_prefix} \
  92. %else
  93. --disable-libvorbis \
  94. %endif
  95. --disable-shared
  96. # build program
  97. %{l_make} %{l_mflags -O}
  98. %install
  99. # install program
  100. rm -rf $RPM_BUILD_ROOT
  101. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  102. # post-adjust installation
  103. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  104. # install daemon control script
  105. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  106. %{SOURCE gift.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/gift
  107. # determine installation files
  108. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  109. %{l_files_std} \
  110. '%not %dir %{l_prefix}/lib/pkgconfig'
  111. %files -f files
  112. %clean
  113. rm -rf $RPM_BUILD_ROOT