mtools.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. ##
  2. ## mtools.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2009 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.12
  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: 20091104
  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. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, texinfo, make, gcc
  44. PreReq: OpenPKG, openpkg >= 20040130
  45. BuildPreReq: libiconv
  46. PreReq: libiconv
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. Mtools is a collection of utilities to access MS-DOS disks from Unix
  51. without mounting them. It supports Win'95 style long file names,
  52. OS/2 Xdf disks and 2m disks (store up to 1992k on a high density 3
  53. 1/2 disk).
  54. %track
  55. prog mtools = {
  56. version = %{V_base}
  57. url = http://www.gnu.org/software/mtools/download.html
  58. regex = mtools-(__VER__)\.tar\.gz
  59. }
  60. %prep
  61. %setup -q
  62. %patch -p0
  63. %build
  64. CC="%{l_cc}" \
  65. CFLAGS="%{l_cflags -O}" \
  66. CPPFLAGS="%{l_cppflags}" \
  67. LDFLAGS="%{l_ldflags}" \
  68. LIBS="-liconv" \
  69. ./configure \
  70. --cache-file=./config.cache \
  71. --prefix=%{l_prefix} \
  72. --mandir=%{l_prefix}/man \
  73. --infodir=%{l_prefix}/info \
  74. --sysconfdir=%{l_prefix}/etc/mtools \
  75. --without-x
  76. %{l_make} %{l_mflags -O}
  77. %install
  78. rm -rf $RPM_BUILD_ROOT
  79. %{l_make} %{l_mflags} install \
  80. MAKEINFO=%{l_prefix}/bin/makeinfo \
  81. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  82. exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
  83. mandir=$RPM_BUILD_ROOT%{l_prefix}/man \
  84. infodir=$RPM_BUILD_ROOT%{l_prefix}/info
  85. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  86. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  87. %{l_shtool} mkdir -f -p -m 755 \
  88. $RPM_BUILD_ROOT%{l_prefix}/etc/mtools
  89. %{l_shtool} install -c -m 644 \
  90. -e '1,3d' \
  91. mtools.conf $RPM_BUILD_ROOT%{l_prefix}/etc/mtools/
  92. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  93. %{l_files_std} \
  94. '%config %{l_prefix}/etc/mtools/*'
  95. %files -f files
  96. %clean
  97. rm -rf $RPM_BUILD_ROOT