mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00

partition: automatic FIX GPT PARTITION TABLE while create partition 当硬盘分区表为GPT时,硬盘容量与GPT分区表不对应(使用DD刷入gpt镜像,或者调整RAID分区大小后),自动修复分区表,修复上述情况下无法创建新分区的BUG
84 lines
2.4 KiB
Makefile
84 lines
2.4 KiB
Makefile
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=luci-app-diskman
|
|
PKG_VERSION:=v0.2.7
|
|
PKG_RELEASE:=beta
|
|
PKG_MAINTAINER:=lisaac <https://github.com/lisaac/luci-app-diskman>
|
|
PKG_LICENSE:=AGPL-3.0
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_URL:=https://github.com/lisaac/luci-app-diskman.git
|
|
PKG_SOURCE_VERSION:=$(PKG_VERSION)
|
|
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
|
|
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(PKG_SOURCE_VERSION).tar.gz
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/$(PKG_NAME)/config
|
|
config PACKAGE_$(PKG_NAME)_INCLUDE_btrfs_progs
|
|
bool "Include btrfs-progs"
|
|
default n
|
|
config PACKAGE_$(PKG_NAME)_INCLUDE_lsblk
|
|
bool "Include lsblk"
|
|
default n
|
|
config PACKAGE_$(PKG_NAME)_INCLUDE_mdadm
|
|
bool "Include mdadm"
|
|
default n
|
|
config PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_raid456
|
|
bool "Include kmod-md-raid456"
|
|
default n
|
|
config PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_linear
|
|
bool "Include kmod-md-linear"
|
|
default n
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)
|
|
SECTION:=luci
|
|
CATEGORY:=LuCI
|
|
SUBMENU:=3. Applications
|
|
TITLE:=Disk Manager interface for LuCI
|
|
PKGARCH:=all
|
|
DEPENDS:=+e2fsprogs +parted +smartmontools +blkid \
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_btrfs_progs:btrfs-progs \
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_lsblk:lsblk \
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_mdadm:mdadm \
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_raid456:kmod-md-mod \
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_raid456:kmod-md-raid456 \
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_linears:kmod-md-mod \
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_linears:kmod-md-linear
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/description
|
|
Disk Manager interface for LuCI
|
|
endef
|
|
|
|
define Build/Prepare
|
|
tar -xzvf $(DL_DIR)/$(PKG_SOURCE) -C $(BUILD_DIR)
|
|
endef
|
|
|
|
define Build/Compile
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/postinst
|
|
#!/bin/sh
|
|
rm -fr /tmp/luci-indexcache /tmp/luci-modulecache
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/install
|
|
# $(INSTALL_DIR) $(1)/
|
|
# cp -pR $(PKG_BUILD_DIR)/root/* $(1)/
|
|
# $(INSTALL_DIR) $(1)/www
|
|
# cp -pR $(PKG_BUILD_DIR)/htdoc/* $(1)/www
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/luci
|
|
cp -pR $(PKG_BUILD_DIR)/luasrc/* $(1)/usr/lib/lua/luci/
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
|
|
$$(foreach po,$$(shell find $(PKG_BUILD_DIR)/po/*/*.po), \
|
|
po2lmo $$(po) \
|
|
$(1)/usr/lib/lua/luci/i18n/diskman.$$(shell echo $$(po) | awk -F'/' '{print $$$$(NF-1)}').lmo;)
|
|
#po2lmo $(PKG_BUILD_DIR)/po/zh-cn/diskman.po $(1)/usr/lib/lua/luci/i18n/diskman.zh-cn.lmo
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,$(PKG_NAME)))
|