deco.spec 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ##
  2. ## deco.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package versions
  24. %define V_deco 1.5.6
  25. %define V_deco_archive 1.2
  26. # package information
  27. Name: deco
  28. Summary: Archive File Extractor
  29. URL: http://hartlich.com/deco/
  30. Vendor: Peter Hartlich
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Archiver
  35. License: GPL
  36. Version: %{V_deco}
  37. Release: 20081022
  38. # list of sources
  39. Source0: http://hartlich.com/deco/download/deco-%{V_deco}.tar.gz
  40. Source1: http://hartlich.com/deco/archive/download/deco-archive-%{V_deco_archive}.tar.gz
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20060823
  45. PreReq: OpenPKG, openpkg >= 20060823
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. Deco is able to extract various archive file formats, with a
  50. consistent command line interface and consistent behavior across all
  51. formats.
  52. %track
  53. prog deco = {
  54. version = %{V_deco}
  55. url = http://hartlich.com/deco/download/
  56. regex = deco-(__VER__)\.tar\.gz
  57. }
  58. prog deco:archive = {
  59. version = %{V_deco_archive}
  60. url = http://hartlich.com/deco/archive/download/
  61. regex = deco-archive-(__VER__)\.tar\.gz
  62. }
  63. %prep
  64. %setup -q
  65. %setup -q -T -D -a 1
  66. mv deco-archive-%{V_deco_archive} extractors
  67. %build
  68. %{l_make} %{l_mflags} \
  69. CC="%{l_cc}" \
  70. CFLAGS="%{l_cflags -O}" \
  71. LDFLAGS="%{l_ldflags}" \
  72. PREFIX="%{l_prefix}"
  73. %install
  74. rm -rf $RPM_BUILD_ROOT
  75. %{l_shtool} mkdir -f -p -m 755 \
  76. $RPM_BUILD_ROOT%{l_prefix}/bin \
  77. $RPM_BUILD_ROOT%{l_prefix}/share/deco
  78. %{l_shtool} install -c -s -m 755 \
  79. deco $RPM_BUILD_ROOT%{l_prefix}/bin/
  80. rm -f extractors/[A-Z]*
  81. rm -rf extractors/part*
  82. rm -rf extractors/rar*
  83. rm -rf extractors/ace*
  84. rm -rf extractors/cbr
  85. rm -rf extractors/*7z*
  86. ( cd extractors && %{l_tar} cf - * ) |\
  87. ( cd $RPM_BUILD_ROOT%{l_prefix}/share/deco && %{l_tar} xf - ) || exit $?
  88. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  89. %files -f files
  90. %clean
  91. rm -rf $RPM_BUILD_ROOT