recipe 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # Build recipe for ntfs-3g.
  2. #
  3. # Copyright (c) 2022 Matias Fonzo, <selk@dragora.org>.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. # Exit immediately on any error
  17. set -e
  18. program=ntfs-3g_ntfsprogs
  19. pkgname=ntfs-3g
  20. version=2022.10.3
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=tools
  24. tarname=${program}-${version}.tgz
  25. # Remote source(s)
  26. fetch=https://tuxera.com/opensource/$tarname
  27. description="
  28. Drivers and utilities for the NTFS file system.
  29. The ntfs-3g package contains a stable, read-write open source driver for
  30. NTFS partitions. NTFS partitions are used by most Microsoft operating
  31. systems, ntfs-3g allows you to mount NTFS partitions in read-write mode
  32. from your GNU/Linux system. It uses the FUSE kernel module to be able to
  33. implement NTFS support in user space. The package also contains various
  34. utilities useful for manipulating NTFS partitions.
  35. "
  36. homepage=https://www.tuxera.com/community/open-source-ntfs-3g/
  37. license="GPLv2+, LGPLv2+"
  38. # Source documentation
  39. docs="AUTHORS COPYING* CREDITS ChangeLog NEWS README TODO*"
  40. docsdir="${docdir}/${pkgname}-${version}"
  41. build()
  42. {
  43. unpack "${tardir}/$tarname"
  44. cd "$srcdir"
  45. # Set sane permissions
  46. chmod -R u+w,go-w,a+rX-s .
  47. # Make sure to point to the /usr hierarchy
  48. sed -i 's#$(DESTDIR)/sbin#$(DESTDIR)/usr/sbin#g' src/Makefile.in
  49. ./configure CPPFLAGS="$QICPPFLAGS" \
  50. CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  51. $configure_args \
  52. --libdir=/usr/lib${libSuffix} \
  53. --mandir=$mandir \
  54. --docdir=$docsdir \
  55. --enable-static=no \
  56. --enable-extras \
  57. --enable-posix-acls \
  58. --enable-xattr-mappings \
  59. --enable-crypto \
  60. --with-fuse=external \
  61. --disable-ldconfig \
  62. --build="$(gcc -dumpmachine)" \
  63. rootbindir=/usr/bin \
  64. rootsbindir=/usr/sbin \
  65. rootlibdir=/usr/lib${libSuffix} \
  66. make -j${jobs} V=1 \
  67. rootbindir=/usr/bin \
  68. rootsbindir=/usr/sbin \
  69. rootlibdir=/usr/lib${libSuffix} \
  70. DESTDIR="$destdir" install
  71. install -p -m 755 "${worktree}/archive/ntfs-3g/mount.ntfs" \
  72. "${destdir}/usr/bin/mount.ntfs"
  73. # Check if 'ntfsallocate' was installed, if not remove its manpage
  74. if test ! -e "${destdir}/usr/bin/ntfsallocate"
  75. then
  76. rm -f "${destdir}/${mandir}/ntfsfallocate.8"
  77. fi
  78. # Compress and link man pages (if needed)
  79. if test -d "${destdir}/$mandir"
  80. then
  81. (
  82. cd "${destdir}/$mandir"
  83. find . -type f -exec lzip -9 {} +
  84. find . -type l | while read -r file
  85. do
  86. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  87. rm -- "$file"
  88. done
  89. )
  90. fi
  91. # Copy documentation
  92. mkdir -p "${destdir}/$docsdir"
  93. cp -p $docs "${destdir}/$docsdir"
  94. }