-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathinstall
More file actions
45 lines (37 loc) · 1.15 KB
/
install
File metadata and controls
45 lines (37 loc) · 1.15 KB
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
41
42
43
44
45
#!/bin/bash
# Copyright (C) 2000-2020 Synology Inc. All rights reserved.
### Use PKG_DIR as working directory.
PKG_DIR=/tmp/_test_spk
rm -rf $PKG_DIR
mkdir -p $PKG_DIR
### get spk packing functions
source /pkgscripts/include/pkg_util.sh
create_package_tgz() {
local firewere_version=
local package_tgz_dir=/tmp/_package_tgz
local binary_dir=$package_tgz_dir/usr/bin
rm -rf $package_tgz_dir && mkdir -p $package_tgz_dir
mkdir -p $binary_dir
cp -av examplePkg $binary_dir
make install DESTDIR="$package_tgz_dir"
pkg_make_package $package_tgz_dir "${PKG_DIR}"
}
create_spk(){
cp -av scripts $PKG_DIR/scripts
cp -av PACKAGE_ICON*.PNG $PKG_DIR
cp -av conf $PKG_DIR
cp -av LICENSE $PKG_DIR
./INFO.sh > INFO
cp INFO $PKG_DIR/INFO
### Create the final spk.
# pkg_make_spk <source path> <dest path> <spk file name>
# Please put the result spk into /image/packages
# spk name functions: pkg_get_spk_name pkg_get_spk_unified_name pkg_get_spk_family_name
mkdir -p /image/packages
pkg_make_spk ${PKG_DIR} "/image/packages" $(pkg_get_spk_family_name)
}
main() {
create_package_tgz
create_spk
}
main "$@"