OSDN Git Service

2e8c20a438cfa57281ec031eea02ea0602cd7d6f
[alterlinux/alterlinux-pkgbuilds.git] / alter-stable / any / alterlinux-live-tools / PKGBUILD
1 # Maintaoner: Yamada Hayao <hayao@fascode.net>
2
3 remove () {
4     local _list
5     local _file
6     _list=($(echo "$@"))
7     for _file in "${_list[@]}"; do
8         if [[ -f ${_file} ]]; then
9             rm -f "${_file}"
10         elif [[ -d ${_file} ]]; then
11             rm -rf "${_file}"
12         fi
13     done
14 }
15 _pkgname=(
16     "alterlinux-live-tools"
17     "alterlinux-gtk-bookmarks"
18     "alterlinux-welcome-page"
19     "alterlinux-plasma-bookmarks"
20     "alterlinux-desktop-file"
21 )
22
23 pkgname=(${_pkgname[@]})
24 _reponame="alterlinux-live-tools"
25 pkgver=1.3
26 pkgrel=1
27 pkgdesc="Scripts required for live environment"
28 arch=('any')
29 url="https://github.com/FascodeNet/${_reponame}"
30 license=('SUSHI-WARE')
31 depends=(
32     "xdg-user-dirs"
33     "bash"
34 )
35 md5sums=("SKIP")
36 source=("${url}/archive/v${pkgver}.zip")
37
38 extracted="${_reponame}-${pkgver}"
39 #extracted="${_reponame}"
40
41 install_files() {
42     _pkgname="${pkgname}"
43     cd "${srcdir}/${extracted}/${_pkgname}"
44     install -m 755 -D "${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
45 }
46
47 install_license() {
48     _pkgname="${pkgname}"
49     cd "${srcdir}/${extracted}/"
50     install -m 755 -D "LICENSE.md" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE.md"
51 }
52
53
54 # alterlinux-live-tools
55 package_alterlinux-live-tools() {
56     pkgdesc="Scripts required for live environment (meta package)"
57     conflicts=('alterlinux-live-tools')
58     provides=("alterlinux-live-tools")
59
60     depends+=(${_pkgname[@]})
61
62
63     install_license
64 }
65
66 # alterlinux-gtk-bookmarks
67 package_alterlinux-gtk-bookmarks() {
68     pkgdesc="Simple script to automatically generate GTK bookmarks"
69     install_files
70     install_license
71 }
72
73 # alterlinux-welcome-page
74 package_alterlinux-welcome-page() {
75     pkgdesc="A simple script to open the official AlterLinux website"
76     optdepends=(
77             'chromium: To open the page'
78             'google-chrome: To open the page'
79             'firefox: To open the page'
80     )
81
82     install_files
83     install_license
84 }
85
86 # alterlinux-plasma-bookmarks
87 package_alterlinux-plasma-bookmarks() {
88     pkgdesc="Simple script to automatically generate Plasma bookmarks"
89     install_files
90     install_license
91 }
92
93 # alterlinux-desktop-file
94 package_alterlinux-desktop-file() {
95     pkgdesc="Place the Calamares icon on your desktop"
96     install_files
97
98     cd "${srcdir}/${extracted}/"
99     install -m 755 -D "${srcdir}/${extracted}/${pkgname}/calamares.desktop" "${pkgdir}/usr/share/alterlinux/desktop-file/calamares.desktop"
100
101     install_license
102 }