From f9d2442200d7c0c5f8cc559c220cbb64d065d28c Mon Sep 17 00:00:00 2001 From: bb-qq Date: Sat, 10 Jul 2021 18:08:50 +0900 Subject: [PATCH] Added DSM 7 support. --- .gitignore | 3 +++ INFO.sh | 28 +++++++++++++++++++++++++++- SynoBuildConf/depends | 4 ---- SynoBuildConf/install | 7 ++++++- conf/resource | 1 + 5 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 .gitignore delete mode 100644 SynoBuildConf/depends create mode 100644 conf/resource diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..47db203 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# autogen +SynoBuildConf/depends +conf/privilege diff --git a/INFO.sh b/INFO.sh index 4b3f932..2119df5 100755 --- a/INFO.sh +++ b/INFO.sh @@ -8,6 +8,32 @@ version="2.15.0-1" displayname="RTL8152/RTL8153 driver" maintainer="bb-qq" arch="$(pkg_get_platform)" -description="Realtek RTL8152/RTL8153 Based USB Ethernet Adapters driver." +install_type="package" +thirdparty="yes" + [ "$(caller)" != "0 NULL" ] && return 0 + +if [ "${PRODUCT_VERSION}" = "7.0" ]; then + os_min_ver="7.0-40000" + RUN_AS="package" + INSTRUCTION=' [DSM7 note] If this is the first time you are installing this driver, special steps are required. See the readme for details.' +else + RUN_AS="root" +fi + +cat < `dirname $0`/conf/privilege +{ + "defaults": { + "run-as": "${RUN_AS}" + } +} +EOS + +cat < `dirname $0`/SynoBuildConf/depends +[default] +all="${PRODUCT_VERSION}" +EOS + +description="Realtek RTL8152/RTL8153 Based USB Ethernet Adapters driver.${INSTRUCTION}" + pkg_dump_info diff --git a/SynoBuildConf/depends b/SynoBuildConf/depends deleted file mode 100644 index fffea9c..0000000 --- a/SynoBuildConf/depends +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright (C) 2000-2017 Synology Inc. All rights reserved. - -[default] -all="6.2" diff --git a/SynoBuildConf/install b/SynoBuildConf/install index b772e74..d8bbf3d 100644 --- a/SynoBuildConf/install +++ b/SynoBuildConf/install @@ -24,11 +24,16 @@ create_package_tgz() { create_spk(){ local scripts_dir=$PKG_DIR/scripts - + local conf_dir=$PKG_DIR/conf + ### Copy package center scripts to PKG_DIR mkdir -p $scripts_dir cp -av scripts/* $scripts_dir + ### Copy package conf to PKG_DIR + mkdir -p $conf_dir + cp -av conf/* $conf_dir + ### Copy package icon cp -av PACKAGE_ICON*.PNG $PKG_DIR diff --git a/conf/resource b/conf/resource new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/conf/resource @@ -0,0 +1 @@ +{} \ No newline at end of file