Skip to content

Commit

Permalink
update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
lisaac committed Mar 8, 2020
1 parent b2b2a7f commit cedcaf7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
24 changes: 21 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-diskman
PKG_VERSION:=v0.2.3
PKG_VERSION:=v0.2.4
PKG_RELEASE:=beta
PKG_MAINTAINER:=lisaac <https://github.com/lisaac/luci-app-diskman>
PKG_LICENSE:=AGPL-3.0
Expand All @@ -11,18 +11,36 @@ 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_VERSION).tar.gz
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 y
config PACKAGE_$(PKG_NAME)_INCLUDE_lsblk
bool "Include lsblk"
default y
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
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-raid456 +PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_linears:kmod-md-linear
endef

define Package/$(PKG_NAME)/description
Expand Down
3 changes: 2 additions & 1 deletion luasrc/model/cbi/diskman/disks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require("luci.tools.webadmin")
local dm = require "luci.model.diskman"

-- Use (non-UCI) SimpleForm since we have no related config file
m = SimpleForm("diskman", translate("DiskMan"), translate("Manage Disks over LuCI."))
m = SimpleForm("diskman", translate("Disk Man"), translate("Manage Disks over LuCI."))
m.template = "diskman/cbi/xsimpleform"
-- m:append(Template("diskman/disk_info"))
-- disable submit and reset button
Expand Down Expand Up @@ -265,6 +265,7 @@ btn_umount.render = function(self, section, scope)
end
btn_umount.write = function(self, section, value)
local res
if not _mount_point.mount_point or not _mount_point.device then return end
if value == translate("Mount") then
luci.util.exec("mkdir -p ".. _mount_point.mount_point)
res = luci.util.exec(dm.command.mount .. " ".. _mount_point.device .. (_mount_point.fs and (" -t ".. _mount_point.fs )or "") .. (_mount_point.mount_options and (" -o " .. _mount_point.mount_options.. " ") or " ").._mount_point.mount_point .. " 2>&1")
Expand Down
2 changes: 1 addition & 1 deletion po/zh-cn/diskman.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ msgid "Device Info"
msgstr "设备信息"

msgid "Disk Man"
msgstr "DiskMan 磁盘管理"
msgstr "磁盘管理"

msgid "Partitions Info"
msgstr "分区信息"
Expand Down

0 comments on commit cedcaf7

Please sign in to comment.