mtools.spec 3.4 KB

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