This repository has been archived by the owner on Aug 18, 2021. It is now read-only.
generated from Qv2ray/QvPlugin-Template
-
Notifications
You must be signed in to change notification settings - Fork 95
101 lines (90 loc) · 3.15 KB
/
pacman.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Build QvSSR Arch Package
on:
push:
release:
types: [prereleased]
jobs:
linux:
name: Arch Linux
runs-on: ubuntu-latest
container: archlinux:latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- name: Setup Basic Environment
run: |
pacman -Syu base-devel git --noconfirm
sed -i '/E_ROOT/d' /usr/bin/makepkg
- name: Checking out sources
uses: actions/checkout@v2
with:
path: 'qv2ray-plugin-ssr'
- name: Build
run: |
cat <<PKGBUILD > PKGBUILD
pkgname=qv2ray-plugin-ssr-dev-automation
_pkgname=qv2ray-plugin-ssr
pkgver=20200411.r20.ea7a893
pkgrel=1
pkgdesc="Qv2ray Plugin: ShadowsocksR"
arch=('x86_64')
url='https://github.com/Qv2ray/QvPlugin-SSR'
license=('GPL3')
_virtualdepends=('qv2ray-plugin-host=1')
depends=('qt5-base>5.11.0' 'openssl' 'libuv' 'libsodium')
optdepends=('qv2ray')
makedepends=('git' 'make' 'qt5-tools' 'which' 'gcc' 'cmake' 'ninja' 'libffi')
provides=('qv2ray-plugin-ssr')
conflicts=('qv2ray-plugin-ssr')
source=("\$_pkgname::git+\${url}")
sha512sums=('SKIP')
pkgver() {
cd "\$srcdir"/"\$_pkgname"
local date=\$(git log -1 --format="%cd" --date=short | sed s/-//g)
local count=\$(git rev-list --count HEAD)
local commit=\$(git rev-parse --short HEAD)
echo "\$date.r\${count}.\$commit"
}
prepare() {
cd "\$srcdir"/"\$_pkgname"
git submodule update --init --recursive
}
build() {
cd "\$srcdir"/"\$_pkgname"
mkdir -p build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DSSR_UVW_WITH_QT=1 \
-DUSE_SYSTEM_SODIUM=ON \
-DUSE_SYSTEM_LIBUV=ON \
-DSTATIC_LINK_LIBUV=OFF \
-DSTATIC_LINK_SODIUM=OFF \
-GNinja
ninja -v
}
package() {
cd "\$srcdir"/"\$_pkgname"/build
install -Dm644 libQvPlugin-SSR.so "\$pkgdir"/usr/share/qv2ray/plugins/libQvPlugin-SSR.so
depends+=(\${_virtualdepends[@]})
ldd libQvPlugin-SSR.so
}
PKGBUILD
makepkg -sf --noconfirm
- name: Get package name
id: get_package
run:
echo ::set-output name=NAME::$(basename qv2ray*.pkg.tar.*)
- name: Upload artifact
uses: actions/upload-artifact@v2-preview
with:
name: ${{ steps.get_package.outputs.NAME }}
path: ${{ steps.get_package.outputs.NAME }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
if: github.event_name == 'release'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.get_package.outputs.NAME }}
asset_name: ${{ steps.get_package.outputs.NAME }}
tag: ${{ github.ref }}
overwrite: true