forked from bb-qq/r8152
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INFO.sh
executable file
·40 lines (32 loc) · 998 Bytes
/
INFO.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Copyright (c) 2000-2017 Synology Inc. All rights reserved.
source /pkgscripts-ng/include/pkg_util.sh
package="r8152"
version="2.16.3-4"
displayname="RTL8152/RTL8153 driver"
maintainer="bb-qq"
arch="$(pkg_get_platform)"
install_type="package"
thirdparty="yes"
[ "$(caller)" != "0 NULL" ] && return 0
PRODUCT_VERSION_WITHOUT_MICRO=`echo ${PRODUCT_VERSION} | sed -E 's/^([0-9]+\.[0-9]+).+$/\1/'`
if [ 1 -eq $(echo "${PRODUCT_VERSION_WITHOUT_MICRO} >= 7.0" | bc) ]; 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 <<EOS > `dirname $0`/conf/privilege
{
"defaults": {
"run-as": "${RUN_AS}"
}
}
EOS
cat <<EOS > `dirname $0`/SynoBuildConf/depends
[default]
all="${PRODUCT_VERSION}"
EOS
description="Realtek RTL8152/RTL8153 Based USB Ethernet Adapters driver.${INSTRUCTION}"
pkg_dump_info