mirror of
https://github.com/coolsnowwolf/packages
synced 2025-01-08 11:17:36 +08:00
parted: update Makefile
This commit is contained in:
parent
6b2d6fbaf0
commit
03339d2660
@ -9,6 +9,7 @@ PKG_SOURCE_DATE:=2021-10-22
|
||||
PKG_SOURCE_VERSION:=9831daf2e14e0e112b5ad95224e9167072d52aa3
|
||||
PKG_MIRROR_HASH:=403d7d20bf2ae67e898db4543c61cc07f337cedf038a11c84a2af5504cfb82e9
|
||||
|
||||
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
|
||||
PKG_LICENSE:=GPL-3.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
|
@ -16,14 +16,14 @@ start_service() {
|
||||
# needs long delay, otherwise service may not register correctly on stratup/reboot (not sure what the issues is?)
|
||||
sleep 5
|
||||
|
||||
if [ -e /etc/ksmbd/smb.conf ] && [ -e /etc/init.d/ksmbd ] && /etc/init.d/ksmbd running; then
|
||||
if [ -e /etc/ksmbd/smb.conf ] && [ -e /etc/init.d/ksmbd ] ; then
|
||||
SMB_CONF="/etc/ksmbd/smb.conf"
|
||||
fi
|
||||
|
||||
[ -e /etc/samba/smb.conf ] && {
|
||||
if [ -e /etc/init.d/samba4 ] && /etc/init.d/samba4 running; then
|
||||
if [ -e /etc/init.d/samba4 ] ; then
|
||||
SMB_CONF="/etc/samba/smb.conf"
|
||||
elif [ -e /etc/init.d/samba ] && /etc/init.d/samba running; then
|
||||
elif [ -e /etc/init.d/samba ] ; then
|
||||
SMB_CONF="/etc/samba/smb.conf"
|
||||
fi
|
||||
}
|
||||
@ -59,12 +59,12 @@ start_service() {
|
||||
local board_sku
|
||||
|
||||
[ -e /tmp/sysinfo/board_name ] && {
|
||||
board_vendor="$(awk -F',' '{print $1}' /tmp/sysinfo/board_name | tr ' ' '_' | tr ',' '-' | tr -d ' \n')"
|
||||
board_sku="$(awk -F',' '{print $2}' /tmp/sysinfo/board_name | tr ' ' '_' | tr ',' '-' | tr -d ' \n')"
|
||||
board_vendor="$(awk -F',' '{print $1}' /tmp/sysinfo/board_name | tr ' ' '_' | tr -d ' \n')"
|
||||
board_sku="$(awk -F',' '{print $2}' /tmp/sysinfo/board_name | tr ' ' '_' | tr -d ' \n')"
|
||||
}
|
||||
|
||||
[ -e /tmp/sysinfo/model ] && {
|
||||
board_model="$(awk -F':' '{print $1}' /tmp/sysinfo/model | tr ' ' '_' | tr ',' '-' | tr -d ' \n')"
|
||||
board_model="$(awk -F':' '{print $1}' /tmp/sysinfo/model | tr ' ' '_' | tr -d ' \n')"
|
||||
}
|
||||
|
||||
[ -n "$board_vendor" ] && [ -n "$board_model" ] && {
|
||||
|
14
utils/parted/Config.in
Normal file
14
utils/parted/Config.in
Normal file
@ -0,0 +1,14 @@
|
||||
menu "Configuration"
|
||||
depends on PACKAGE_parted
|
||||
|
||||
config PARTED_READLINE
|
||||
bool "Use readline library"
|
||||
depends on PACKAGE_parted
|
||||
default y
|
||||
|
||||
config PARTED_LVM2
|
||||
bool "Support LVM"
|
||||
depends on PACKAGE_parted
|
||||
default n
|
||||
|
||||
endmenu
|
@ -1,50 +1,78 @@
|
||||
#
|
||||
# Copyright (C) 2019 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=parted
|
||||
PKG_VERSION:=3.3
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=3.4
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/parted-$(PKG_VERSION)
|
||||
PKG_SOURCE:=parted-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNU/parted
|
||||
PKG_MD5SUM:=090655d05f3c471aa8e15a27536889ec
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/parted/
|
||||
PKG_HASH:=e1298022472da5589b7f2be1d5ee3c1b66ec3d96dfbad03dc642afd009da5342
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PARTED_LVM2 \
|
||||
CONFIG_PARTED_READLINE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libparted
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=GNU Parted library
|
||||
DEPENDS:=+libblkid +libuuid +PARTED_LVM2:libdevmapper
|
||||
endef
|
||||
|
||||
define Package/libparted/description
|
||||
GNU Parted shared library
|
||||
endef
|
||||
|
||||
define Package/parted
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Disc
|
||||
TITLE:=parted Partition editor
|
||||
URL:=http://www.gnu.org/software/parted/index.shtml
|
||||
DEPENDS:= +libuuid +libreadline +libncurses +libblkid
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=GNU Parted
|
||||
SUBMENU:=Disc
|
||||
DEPENDS:=+libparted +PARTED_READLINE:libreadline +PARTED_READLINE:libncurses
|
||||
endef
|
||||
|
||||
define Package/parted/description
|
||||
parted Partition editor
|
||||
http://www.gnu.org/software/parted/index.shtml
|
||||
GNU Parted manipulates partition tables. This is useful for
|
||||
creating space for new operating systems, reorganizing
|
||||
disk usage, copying data on hard disks and disk imaging.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default, \
|
||||
--without-readline \
|
||||
--disable-device-mapper \
|
||||
--disable-nls \
|
||||
)
|
||||
define Package/parted/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
$(if $(CONFIG_PARTED_READLINE),--with-readline,--without-readline) \
|
||||
$(if $(CONFIG_PARTED_LVM2),--enable-device-mapper,--disable-device-mapper)
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/parted $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so** $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/parted/*.h $(1)/usr/include/parted/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libparted/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so** $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/parted/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libparted/.libs/*.so* $(1)/usr/lib/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libparted/fs/.libs/*.so* $(1)/usr/lib/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/parted/.libs/parted $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/partprobe/.libs/partprobe $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/parted $(1)/sbin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/partprobe $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,parted))
|
||||
$(eval $(call BuildPackage,libparted))
|
||||
$(eval $(call BuildPackage,parted))
|
||||
|
7
utils/parted/test.sh
Normal file
7
utils/parted/test.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
"parted")
|
||||
test $(/sbin/parted --version | grep '^Copyright' | wc -l) -gt 0
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user