mtools.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ##
  2. ## mtools.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 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 version
  25. %define V_base 3.9.10
  26. %define V_patch 20070308
  27. # package information
  28. Name: mtools
  29. Summary: Access MS-DOS disks from Unix without mounting
  30. URL: http://mtools.linux.lu/
  31. Vendor: Alain Knaff
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: PLUS
  35. Group: Filesystem
  36. License: GPL
  37. Version: %{V_base}
  38. Release: 20070308
  39. # list of sources
  40. Source0: http://mtools.linux.lu/mtools-%{V_base}.tar.gz
  41. Patch0: http://mtools.linux.lu/mtools-%{V_base}-%{V_patch}.diff.gz
  42. Patch1: mtools.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130, texinfo, make, gcc
  47. PreReq: OpenPKG, openpkg >= 20040130
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. Mtools is a collection of utilities to access MS-DOS disks from Unix
  52. without mounting them. It supports Win'95 style long file names,
  53. OS/2 Xdf disks and 2m disks (store up to 1992k on a high density 3
  54. 1/2 disk).
  55. %track
  56. prog mtools = {
  57. version = %{V_base}
  58. url = http://mtools.linux.lu/download.html
  59. regex = mtools-(__VER__)\.tar\.gz
  60. }
  61. prog mtools:patch = {
  62. version = %{V_patch}
  63. url = http://mtools.linux.lu/download.html
  64. regex = mtools-%{V_base}-(__VER__)\.diff\.gz
  65. }
  66. %prep
  67. %setup -q
  68. %patch -p1 -P 0
  69. %patch -p0 -P 1
  70. %build
  71. CC="%{l_cc}" \
  72. CFLAGS="%{l_cflags -O}" \
  73. ./configure \
  74. --prefix=%{l_prefix} \
  75. --sysconfdir=%{l_prefix}/etc/mtools \
  76. --without-x
  77. %{l_make} %{l_mflags -O}
  78. %install
  79. rm -rf $RPM_BUILD_ROOT
  80. %{l_make} %{l_mflags} install \
  81. MAKEINFO=%{l_prefix}/bin/makeinfo \
  82. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  83. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  84. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  85. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  86. %{l_shtool} mkdir -f -p -m 755 \
  87. $RPM_BUILD_ROOT%{l_prefix}/etc/mtools
  88. %{l_shtool} install -c -m 644 \
  89. -e '1,3d' \
  90. mtools.conf $RPM_BUILD_ROOT%{l_prefix}/etc/mtools/
  91. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  92. %{l_files_std} \
  93. '%config %{l_prefix}/etc/mtools/*'
  94. %files -f files
  95. %clean
  96. rm -rf $RPM_BUILD_ROOT