package.mk 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. ################################################################################
  2. # This file is part of OpenELEC - http://www.openelec.tv
  3. # Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
  4. #
  5. # OpenELEC is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 2 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # OpenELEC is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
  17. ################################################################################
  18. PKG_NAME="util-linux"
  19. PKG_VERSION="2.27.1"
  20. PKG_REV="1"
  21. PKG_ARCH="any"
  22. PKG_LICENSE="GPL"
  23. PKG_URL="http://www.kernel.org/pub/linux/utils/util-linux/v2.27/$PKG_NAME-$PKG_VERSION.tar.xz"
  24. PKG_DEPENDS_TARGET="toolchain"
  25. PKG_DEPENDS_INIT="toolchain"
  26. PKG_PRIORITY="optional"
  27. PKG_SECTION="system"
  28. PKG_SHORTDESC="util-linux: Miscellaneous system utilities for Linux"
  29. PKG_LONGDESC="The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among many features, Util-linux contains the fdisk configuration tool and the login program."
  30. PKG_IS_ADDON="no"
  31. PKG_AUTORECONF="yes"
  32. UTILLINUX_CONFIG_DEFAULT="--disable-gtk-doc \
  33. --disable-nls \
  34. --disable-rpath \
  35. --enable-tls \
  36. --disable-all-programs \
  37. --enable-chsh-only-listed \
  38. --enable-libmount-force-mountinfo \
  39. --disable-bash-completion \
  40. --disable-colors-default \
  41. --disable-pylibmount \
  42. --disable-pg-bell \
  43. --disable-use-tty-group \
  44. --disable-makeinstall-chown \
  45. --disable-makeinstall-setuid \
  46. --with-gnu-ld \
  47. --without-selinux \
  48. --without-audit \
  49. --without-udev \
  50. --without-ncurses \
  51. --without-readline \
  52. --without-slang \
  53. --without-termcap \
  54. --without-tinfo \
  55. --without-utempter \
  56. --without-util \
  57. --without-libz \
  58. --without-user \
  59. --without-systemd \
  60. --without-smack \
  61. --without-python \
  62. --without-systemdsystemunitdir"
  63. PKG_CONFIGURE_OPTS_TARGET="$UTILLINUX_CONFIG_DEFAULT \
  64. --enable-libuuid \
  65. --enable-libblkid \
  66. --enable-libmount \
  67. --enable-libsmartcols \
  68. --enable-losetup \
  69. --enable-fsck \
  70. --enable-blkid"
  71. if [ "$SWAP_SUPPORT" = "yes" ]; then
  72. PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-swapon"
  73. fi
  74. PKG_CONFIGURE_OPTS_HOST="--enable-static \
  75. --disable-shared \
  76. $UTILLINUX_CONFIG_DEFAULT \
  77. --enable-uuidgen \
  78. --enable-libuuid"
  79. PKG_CONFIGURE_OPTS_INIT="--prefix=/ \
  80. --bindir=/bin \
  81. --sbindir=/sbin \
  82. --sysconfdir=/etc \
  83. --libexecdir=/lib \
  84. --localstatedir=/var \
  85. $UTILLINUX_CONFIG_DEFAULT \
  86. --enable-libblkid \
  87. --enable-libmount \
  88. --enable-fsck"
  89. if [ "$INITRAMFS_PARTED_SUPPORT" = "yes" ]; then
  90. PKG_CONFIGURE_OPTS_INIT="$PKG_CONFIGURE_OPTS_INIT --enable-mkfs --enable-libuuid"
  91. fi
  92. post_makeinstall_target() {
  93. if [ "$SWAP_SUPPORT" = "yes" ]; then
  94. mkdir -p $INSTALL/usr/lib/libreelec
  95. cp -PR $PKG_DIR/scripts/mount-swap $INSTALL/usr/lib/libreelec
  96. mkdir -p $INSTALL/etc
  97. cat $PKG_DIR/config/swap.conf | \
  98. sed -e "s,@SWAPFILESIZE@,$SWAPFILESIZE,g" \
  99. -e "s,@SWAP_ENABLED_DEFAULT@,$SWAP_ENABLED_DEFAULT,g" \
  100. > $INSTALL/etc/swap.conf
  101. fi
  102. }
  103. post_install () {
  104. if [ "$SWAP_SUPPORT" = "yes" ]; then
  105. enable_service swap.service
  106. fi
  107. }