forked from aryanshar/libfprint
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from rootd/master
Automatically generate .deb/.rpm/ArchLinux packages
- Loading branch information
Showing
2 changed files
with
156 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build Linux packages | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
- goodixtls | ||
- sigfm | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: nicksnell/action-reset-repo@master | ||
with: | ||
reset_branch: buildpackage | ||
base_branch: master | ||
github_token: ${{ github.token }} | ||
- name: Merge goodixtls -> buildpackage | ||
uses: devmasx/merge-branch@master | ||
with: | ||
type: now | ||
from_branch: goodixtls | ||
target_branch: buildpackage | ||
github_token: ${{ github.token }} | ||
- name: Merge sigfm -> buildpackage | ||
uses: devmasx/merge-branch@master | ||
with: | ||
type: now | ||
from_branch: sigfm | ||
target_branch: buildpackage | ||
github_token: ${{ github.token }} | ||
- name: Chown user | ||
run: | | ||
sudo chown -R $USER:$USER $GITHUB_WORKSPACE | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: buildpackage | ||
- uses: actions/setup-python@v1 | ||
- name: Install dependencies | ||
run: sudo apt-get install -y libgusb-dev libgirepository1.0-dev libnss3-dev libgudev-1.0-dev gtk-doc-tools libopencv-dev doctest-dev | ||
- uses: BSFishy/[email protected] | ||
with: | ||
action: build | ||
setup-options: --prefix /usr/ --buildtype=release | ||
options: --verbose | ||
meson-version: 0.63.3 | ||
ninja-version: 1.10.2 | ||
- name: Install nFPM | ||
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 | ||
- name: Prepare nFPM config | ||
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 | ||
- name: Generating DEB package | ||
run: nfpm pkg --packager deb --target ./output/ | ||
- name: Generating RPM package | ||
run: nfpm pkg --packager rpm --target ./output/ | ||
- name: Generating ArchLinux package | ||
run: nfpm pkg --packager archlinux --target ./output/ | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: meson-build-artifacts | ||
path: /home/runner/work/libfprint/libfprint/build | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: deb-rpm-arch-packages | ||
path: /home/runner/work/libfprint/libfprint/output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# check https://nfpm.goreleaser.com/configuration for detailed usage | ||
# | ||
name: "libfprint" | ||
arch: "amd64" | ||
platform: "linux" | ||
version: "1.94.4" | ||
prerelease: goodixtls-COMMITID | ||
section: "default" | ||
priority: "extra" | ||
replaces: | ||
- libfprint | ||
maintainer: "Alexander Meiler <[email protected]>" | ||
description: | | ||
This is a community focused on implementing drivers for Goodix devices on Linux. | ||
vendor: "Goodix Fingerprint Linux Development" | ||
homepage: "https://github.com/goodix-fp-linux-dev" | ||
license: "GNU LGPL 2.1" | ||
contents: | ||
- src: ./build/libfprint/fp-enums.h | ||
dst: /usr/include/libfprint-2/fp-enums.h | ||
|
||
- src: ./build/libfprint/libfprint-2.so.2.0.0 | ||
dst: /usr/lib64/libfprint-2.so.2.0.0 | ||
|
||
- src: ./build/libfprint/70-libfprint-2.rules | ||
dst: /usr/lib/udev/rules.d/70-libfprint-2.rules | ||
|
||
- src: ./build/libfprint/FPrint-2.0.gir | ||
dst: /usr/share/gir-1.0/FPrint-2.0.gir | ||
|
||
- src: ./build/libfprint/FPrint-2.0.typelib | ||
dst: /usr/lib64/girepository-1.0/FPrint-2.0.typelib | ||
|
||
- src: ./libfprint/fprint.h | ||
dst: /usr/include/libfprint-2/fprint.h | ||
|
||
- src: ./libfprint/fp-context.h | ||
dst: /usr/include/libfprint-2/fp-context.h | ||
|
||
- src: ./libfprint/fp-device.h | ||
dst: /usr/include/libfprint-2/fp-device.h | ||
|
||
- src: ./libfprint/fp-image-device.h | ||
dst: /usr/include/libfprint-2/fp-image-device.h | ||
|
||
- src: ./libfprint/fp-image.h | ||
dst: /usr/include/libfprint-2/fp-image.h | ||
|
||
- src: ./libfprint/fp-print.h | ||
dst: /usr/include/libfprint-2/fp-print.h | ||
|
||
- src: ./build/meson-private/libfprint-2.pc | ||
dst: /usr/lib64/pkgconfig/libfprint-2.pc | ||
|
||
- src: ./build/libfprint/libfprint-2.so.2.0.0 | ||
dst: /usr/lib64/libfprint-2.so.2 | ||
type: symlink | ||
|
||
- src: ./build/libfprint/libfprint-2.so.2.0.0 | ||
dst: /usr/lib64/libfprint-2.so | ||
type: symlink | ||
|
||
overrides: | ||
deb: | ||
depends: | ||
- libgudev | ||
- libgusb | ||
- nss | ||
- openssl | ||
- pixman | ||
rpm: | ||
provides: | ||
- libfprint | ||
- libfprint(aarch-64) | ||
- libfprint-2.so.2()(64bit) | ||
- libfprint-2.so.2(LIBFPRINT_2.0.0)(64bit) | ||
|
||
depends: | ||
- libgudev | ||
- libgusb | ||
- nss | ||
- openssl | ||
- pixman | ||
archlinux: | ||
depends: | ||
- libgudev | ||
- libgusb | ||
- nss | ||
- openssl | ||
- pixman |