Skip to content

Commit 33f1a3c

Browse files
authored
Merge pull request #16 from rootd/master
Automatically generate .deb/.rpm/ArchLinux packages
2 parents 782d228 + dfa8401 commit 33f1a3c

File tree

2 files changed

+156
-0
lines changed

2 files changed

+156
-0
lines changed

.github/workflows/main.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build Linux packages
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- master
7+
- goodixtls
8+
- sigfm
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: nicksnell/action-reset-repo@master
15+
with:
16+
reset_branch: buildpackage
17+
base_branch: master
18+
github_token: ${{ github.token }}
19+
- name: Merge goodixtls -> buildpackage
20+
uses: devmasx/merge-branch@master
21+
with:
22+
type: now
23+
from_branch: goodixtls
24+
target_branch: buildpackage
25+
github_token: ${{ github.token }}
26+
- name: Merge sigfm -> buildpackage
27+
uses: devmasx/merge-branch@master
28+
with:
29+
type: now
30+
from_branch: sigfm
31+
target_branch: buildpackage
32+
github_token: ${{ github.token }}
33+
- name: Chown user
34+
run: |
35+
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
36+
- uses: actions/checkout@v3
37+
with:
38+
ref: buildpackage
39+
- uses: actions/setup-python@v1
40+
- name: Install dependencies
41+
run: sudo apt-get install -y libgusb-dev libgirepository1.0-dev libnss3-dev libgudev-1.0-dev gtk-doc-tools libopencv-dev doctest-dev
42+
- uses: BSFishy/[email protected]
43+
with:
44+
action: build
45+
setup-options: --prefix /usr/ --buildtype=release
46+
options: --verbose
47+
meson-version: 0.63.3
48+
ninja-version: 1.10.2
49+
- name: Install nFPM
50+
run: echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list && sudo apt update && sudo apt install nfpm
51+
- name: Prepare nFPM config
52+
run: cd /home/runner/work/libfprint/libfprint && cp nfpm_sample.yaml nfpm.yaml && sed -i "s/COMMITID/$(git rev-parse --short HEAD)/g" nfpm.yaml && mkdir ./output
53+
- name: Generating DEB package
54+
run: nfpm pkg --packager deb --target ./output/
55+
- name: Generating RPM package
56+
run: nfpm pkg --packager rpm --target ./output/
57+
- name: Generating ArchLinux package
58+
run: nfpm pkg --packager archlinux --target ./output/
59+
- uses: actions/upload-artifact@v3
60+
with:
61+
name: meson-build-artifacts
62+
path: /home/runner/work/libfprint/libfprint/build
63+
- uses: actions/upload-artifact@v3
64+
with:
65+
name: deb-rpm-arch-packages
66+
path: /home/runner/work/libfprint/libfprint/output

nfpm_sample.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# check https://nfpm.goreleaser.com/configuration for detailed usage
2+
#
3+
name: "libfprint"
4+
arch: "amd64"
5+
platform: "linux"
6+
version: "1.94.4"
7+
prerelease: goodixtls-COMMITID
8+
section: "default"
9+
priority: "extra"
10+
replaces:
11+
- libfprint
12+
maintainer: "Alexander Meiler <[email protected]>"
13+
description: |
14+
This is a community focused on implementing drivers for Goodix devices on Linux.
15+
vendor: "Goodix Fingerprint Linux Development"
16+
homepage: "https://github.com/goodix-fp-linux-dev"
17+
license: "GNU LGPL 2.1"
18+
contents:
19+
- src: ./build/libfprint/fp-enums.h
20+
dst: /usr/include/libfprint-2/fp-enums.h
21+
22+
- src: ./build/libfprint/libfprint-2.so.2.0.0
23+
dst: /usr/lib64/libfprint-2.so.2.0.0
24+
25+
- src: ./build/libfprint/70-libfprint-2.rules
26+
dst: /usr/lib/udev/rules.d/70-libfprint-2.rules
27+
28+
- src: ./build/libfprint/FPrint-2.0.gir
29+
dst: /usr/share/gir-1.0/FPrint-2.0.gir
30+
31+
- src: ./build/libfprint/FPrint-2.0.typelib
32+
dst: /usr/lib64/girepository-1.0/FPrint-2.0.typelib
33+
34+
- src: ./libfprint/fprint.h
35+
dst: /usr/include/libfprint-2/fprint.h
36+
37+
- src: ./libfprint/fp-context.h
38+
dst: /usr/include/libfprint-2/fp-context.h
39+
40+
- src: ./libfprint/fp-device.h
41+
dst: /usr/include/libfprint-2/fp-device.h
42+
43+
- src: ./libfprint/fp-image-device.h
44+
dst: /usr/include/libfprint-2/fp-image-device.h
45+
46+
- src: ./libfprint/fp-image.h
47+
dst: /usr/include/libfprint-2/fp-image.h
48+
49+
- src: ./libfprint/fp-print.h
50+
dst: /usr/include/libfprint-2/fp-print.h
51+
52+
- src: ./build/meson-private/libfprint-2.pc
53+
dst: /usr/lib64/pkgconfig/libfprint-2.pc
54+
55+
- src: ./build/libfprint/libfprint-2.so.2.0.0
56+
dst: /usr/lib64/libfprint-2.so.2
57+
type: symlink
58+
59+
- src: ./build/libfprint/libfprint-2.so.2.0.0
60+
dst: /usr/lib64/libfprint-2.so
61+
type: symlink
62+
63+
overrides:
64+
deb:
65+
depends:
66+
- libgudev
67+
- libgusb
68+
- nss
69+
- openssl
70+
- pixman
71+
rpm:
72+
provides:
73+
- libfprint
74+
- libfprint(aarch-64)
75+
- libfprint-2.so.2()(64bit)
76+
- libfprint-2.so.2(LIBFPRINT_2.0.0)(64bit)
77+
78+
depends:
79+
- libgudev
80+
- libgusb
81+
- nss
82+
- openssl
83+
- pixman
84+
archlinux:
85+
depends:
86+
- libgudev
87+
- libgusb
88+
- nss
89+
- openssl
90+
- pixman

0 commit comments

Comments
 (0)