Skip to content

Commit 0202f2b

Browse files
committed
pkg/debian: Use standard debian packaging
Unfortunately, makedeb is no longer maintained. So switch to standard tooling.
1 parent cc020ad commit 0202f2b

File tree

11 files changed

+311
-369
lines changed

11 files changed

+311
-369
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,53 +13,33 @@ jobs:
1313
container: ubuntu:22.04
1414

1515
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v4
18-
1916
- name: Install build dependencies
2017
run: |
2118
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
2219
sed 's/^deb /deb-src /' /etc/apt/sources.list >> /etc/apt/sources.list
2320
apt-get -q -y update
2421
apt-get -q -y install build-essential debhelper dpkg-sig fakeroot wget git meson \
25-
python3-pyudev python3-pytest python3-libevdev sudo gpg
22+
python3-pyudev python3-pytest python3-libevdev ninja-build patch gpg
2623
apt-get -q -y build-dep libwacom libwacom-dev
2724
28-
# makedeb
29-
wget -qO - 'https://proget.makedeb.org/debian-feeds/makedeb.pub' \
30-
| gpg --dearmor \
31-
| sudo tee /usr/share/keyrings/makedeb-archive-keyring.gpg 1> /dev/null
32-
33-
echo 'deb [signed-by=/usr/share/keyrings/makedeb-archive-keyring.gpg arch=all] https://proget.makedeb.org/ makedeb main' \
34-
| sudo tee /etc/apt/sources.list.d/makedeb.list
35-
36-
sudo apt update
37-
38-
apt-get -q -y update
39-
apt-get -q -y install makedeb
25+
- name: Checkout code
26+
uses: actions/checkout@v4
4027

4128
- name: Build package
4229
run: |
43-
cd pkg/debian
44-
./updlinks.sh
45-
46-
# Fix permissions (can't makepkg as root)
47-
useradd -m build
48-
echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
49-
chown -R build .
50-
51-
# Import GPG key for liwbacom/Peter Hutterer
52-
su build --pty -s /bin/bash -c 'gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 3C2C43D9447D5938EF4551EBE23B7E70B467F0BF'
30+
# Import GPG keys for libwacom/Peter Hutterer
31+
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 3C2C43D9447D5938EF4551EBE23B7E70B467F0BF || true
32+
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 594ABBA066118C7A02D10A80A8AF906D9307FBAD || true
5333
54-
# build package
55-
su build --pty -s /bin/bash -c 'makedeb --sync-deps --no-confirm --skip-pgp-check'
34+
# Build packages using dpkg-buildpackage
35+
./pkg/deb/makedeb
5636
5737
- name: Sign package
5838
env:
5939
GPG_KEY_ID: 56C464BAAC421453
6040
GPG_KEY: ${{ secrets.LINUX_SURFACE_GPG_KEY }}
6141
run: |
62-
cd pkg/debian
42+
cd pkg/deb
6343
6444
# import GPG key
6545
echo "$GPG_KEY" | base64 -d | gpg --import --no-tty --batch --yes
@@ -71,8 +51,8 @@ jobs:
7151
- name: Prepare release
7252
run: |
7353
mkdir release
74-
rm -f ./pkg/debian/libwacom-surface-dbgsym_*.deb || true
75-
mv ./pkg/debian/*.deb release
54+
rm -f ./pkg/deb/*-dbgsym_*.ddeb || true
55+
mv ./pkg/deb/*.deb release
7656
7757
- name: Upload artifacts
7858
uses: actions/upload-artifact@v4

pkg/deb/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.deb
2+
*.build
3+
*.buildinfo
4+
*.changes
5+
*.tar
6+
libwacom-*/
7+
src/

pkg/deb/debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
libwacom-surface (2.17.0-1) unstable; urgency=medium
2+
3+
* Update to libwacom-2.17.0
4+
* Replace makedeb with standard Debian packaging
5+
6+
-- Maximilian Luz <[email protected]> Mon, 30 Dec 2025 03:00:00 +0200

pkg/deb/debian/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

pkg/deb/debian/control

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
Source: libwacom-surface
2+
Section: libs
3+
Priority: optional
4+
Maintainer: Maximilian Luz <[email protected]>
5+
Build-Depends: build-essential,
6+
debhelper (>= 10),
7+
meson,
8+
ninja-build,
9+
libglib2.0-dev,
10+
libgudev-1.0-dev,
11+
libxml2-dev,
12+
libevdev-dev,
13+
udev,
14+
wget,
15+
patch,
16+
python3-libevdev,
17+
python3-pytest,
18+
python3-pyudev
19+
20+
Package: libwacom2-surface
21+
Architecture: amd64
22+
Depends: ${shlibs:Depends}, ${misc:Depends},
23+
libglib2.0-0,
24+
libgudev-1.0-0,
25+
systemd,
26+
libwacom-common-surface (= ${binary:Version})
27+
Conflicts: libwacom2
28+
Provides: libwacom2 (= 1.12.1-1)
29+
Description: Wacom model feature query library (patched for Surface devices)
30+
libwacom is a library to identify wacom tablets and their model-specific
31+
features. It provides easy access to information such as "is this a
32+
built-in on-screen tablet", "what is the size of this model", etc.
33+
.
34+
This package contains the library for libwacom 1.x series, patched to
35+
support Microsoft Surface devices.
36+
37+
Package: libwacom2-dev-surface
38+
Section: libdevel
39+
Architecture: amd64
40+
Depends: ${misc:Depends},
41+
libglib2.0-dev,
42+
libgudev-1.0-dev,
43+
libwacom2-surface (= ${binary:Version})
44+
Conflicts: libwacom-dev, libwacom9-dev-surface
45+
Provides: libwacom-dev (= 1.12.1-1)
46+
Description: Wacom model feature query library (development files)
47+
libwacom is a library to identify wacom tablets and their model-specific
48+
features. It provides easy access to information such as "is this a
49+
built-in on-screen tablet", "what is the size of this model", etc.
50+
.
51+
This package contains the development files for libwacom 1.x series.
52+
53+
Package: libwacom9-surface
54+
Architecture: amd64
55+
Depends: ${shlibs:Depends}, ${misc:Depends},
56+
libglib2.0-0,
57+
libgudev-1.0-0,
58+
systemd,
59+
libwacom-common-surface (= ${binary:Version})
60+
Conflicts: libwacom9
61+
Provides: libwacom9 (= 2.17.0-1)
62+
Description: Wacom model feature query library (patched for Surface devices)
63+
libwacom is a library to identify wacom tablets and their model-specific
64+
features. It provides easy access to information such as "is this a
65+
built-in on-screen tablet", "what is the size of this model", etc.
66+
.
67+
This package contains the library for libwacom 2.x series, patched to
68+
support Microsoft Surface devices.
69+
70+
Package: libwacom9-dev-surface
71+
Section: libdevel
72+
Architecture: amd64
73+
Depends: ${misc:Depends},
74+
libglib2.0-dev,
75+
libgudev-1.0-dev,
76+
libwacom9-surface (= ${binary:Version})
77+
Conflicts: libwacom-dev, libwacom2-dev-surface
78+
Provides: libwacom-dev (= 2.17.0-1)
79+
Description: Wacom model feature query library (development files)
80+
libwacom is a library to identify wacom tablets and their model-specific
81+
features. It provides easy access to information such as "is this a
82+
built-in on-screen tablet", "what is the size of this model", etc.
83+
.
84+
This package contains the development files for libwacom 2.x series.
85+
86+
Package: libwacom-common-surface
87+
Architecture: all
88+
Depends: ${misc:Depends}
89+
Conflicts: libwacom-common
90+
Provides: libwacom-common (= 2.17.0-1)
91+
Description: Wacom model feature query library (common data files)
92+
libwacom is a library to identify wacom tablets and their model-specific
93+
features. It provides easy access to information such as "is this a
94+
built-in on-screen tablet", "what is the size of this model", etc.
95+
.
96+
This package contains common data files for libwacom, patched to support
97+
Microsoft Surface devices.
98+
99+
Package: libwacom-bin-surface
100+
Architecture: amd64
101+
Depends: ${shlibs:Depends}, ${misc:Depends},
102+
libglib2.0-0,
103+
libgudev-1.0-0,
104+
systemd,
105+
libwacom9-surface (= ${binary:Version})
106+
Conflicts: libwacom-bin
107+
Provides: libwacom-bin (= 2.17.0-1)
108+
Description: Wacom model feature query library (utilities)
109+
libwacom is a library to identify wacom tablets and their model-specific
110+
features. It provides easy access to information such as "is this a
111+
built-in on-screen tablet", "what is the size of this model", etc.
112+
.
113+
This package contains utilities for libwacom.
114+
115+
Package: libwacom-surface
116+
Architecture: amd64
117+
Depends: ${misc:Depends},
118+
libwacom2-surface (= ${binary:Version}),
119+
libwacom9-surface (= ${binary:Version}),
120+
libwacom-bin-surface (= ${binary:Version}),
121+
libwacom-common-surface (= ${binary:Version})
122+
Description: Wacom model feature query library (metapackage for Surface devices)
123+
libwacom is a library to identify wacom tablets and their model-specific
124+
features. It provides easy access to information such as "is this a
125+
built-in on-screen tablet", "what is the size of this model", etc.
126+
.
127+
This metapackage depends on all libwacom packages patched for Microsoft
128+
Surface devices.

pkg/debian/0001-Revert-minimum-meson-version-to-v0.53.0.patch renamed to pkg/deb/debian/patches/0001-Revert-minimum-meson-version-to-v0.53.0.patch

File renamed without changes.

pkg/deb/debian/rules

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
#!/usr/bin/make -f
2+
export DH_VERBOSE = 1
3+
export DEB_BUILD_OPTIONS = noautodbgsym
4+
5+
LIBWACOM_V1 = 1.12.1
6+
LIBWACOM_V2 = 2.17.0
7+
8+
SRC_V1 = libwacom-$(LIBWACOM_V1)
9+
SRC_V2 = libwacom-$(LIBWACOM_V2)
10+
11+
URL_V1 = https://github.com/linuxwacom/libwacom/releases/download/libwacom-$(LIBWACOM_V1)/libwacom-$(LIBWACOM_V1).tar.bz2
12+
URL_V2 = https://github.com/linuxwacom/libwacom/releases/download/libwacom-$(LIBWACOM_V2)/libwacom-$(LIBWACOM_V2).tar.xz
13+
14+
PATCHES_V1 = $(wildcard ../../patches/v1/*.patch)
15+
PATCHES_V2 = $(wildcard ../../patches/v2/*.patch)
16+
17+
clean:
18+
dh clean
19+
rm -rf $(SRC_V1) $(SRC_V2)
20+
rm -f $(SRC_V1).tar.bz2 $(SRC_V2).tar.xz
21+
22+
build:
23+
dh build
24+
25+
# Download and extract v1
26+
test -f $(SRC_V1).tar.bz2 || wget -O $(SRC_V1).tar.bz2 $(URL_V1)
27+
test -d $(SRC_V1) || tar -xjf $(SRC_V1).tar.bz2
28+
29+
# Download and extract v2
30+
test -f $(SRC_V2).tar.xz || wget -O $(SRC_V2).tar.xz $(URL_V2)
31+
test -d $(SRC_V2) || tar -xJf $(SRC_V2).tar.xz
32+
33+
# Patch v1
34+
cd $(SRC_V1) && \
35+
(patch -Np1 < ../debian/patches/0001-Revert-minimum-meson-version-to-v0.53.0.patch || true) && \
36+
for p in $(PATCHES_V1); do \
37+
patch -Np1 < $$p || true; \
38+
done
39+
40+
# Patch v2
41+
cd $(SRC_V2) && \
42+
(patch -Np1 < ../debian/patches/0001-Revert-minimum-meson-version-to-v0.53.0.patch || true) && \
43+
for p in $(PATCHES_V2); do \
44+
patch -Np1 < $$p || true; \
45+
done
46+
47+
# Build v1
48+
cd $(SRC_V1) && \
49+
meson build . --prefix=/usr && \
50+
ninja -C build
51+
52+
# Build v2
53+
cd $(SRC_V2) && \
54+
meson build . --prefix=/usr && \
55+
ninja -C build
56+
57+
override_dh_auto_install:
58+
# Install libwacom2-surface (v1 library only)
59+
cd $(SRC_V1) && DESTDIR=$(CURDIR)/debian/libwacom2-surface ninja install -C build
60+
rm -rf debian/libwacom2-surface/usr/bin
61+
rm -rf debian/libwacom2-surface/usr/include
62+
rm -rf debian/libwacom2-surface/usr/lib/udev
63+
rm -rf debian/libwacom2-surface/usr/lib/x86_64-linux-gnu/pkgconfig
64+
rm -rf debian/libwacom2-surface/usr/lib/x86_64-linux-gnu/libwacom.so
65+
rm -rf debian/libwacom2-surface/usr/share
66+
install -D -m644 $(SRC_V1)/COPYING debian/libwacom2-surface/usr/share/doc/libwacom2-surface/copyright
67+
68+
# Install libwacom2-dev-surface (v1 dev files only)
69+
cd $(SRC_V1) && DESTDIR=$(CURDIR)/debian/libwacom2-dev-surface ninja install -C build
70+
rm -rf debian/libwacom2-dev-surface/usr/bin
71+
rm -rf debian/libwacom2-dev-surface/usr/lib/udev
72+
rm -rf debian/libwacom2-dev-surface/usr/lib/x86_64-linux-gnu/libwacom.so.*
73+
rm -rf debian/libwacom2-dev-surface/usr/share
74+
install -D -m644 $(SRC_V1)/COPYING debian/libwacom2-dev-surface/usr/share/doc/libwacom2-dev-surface/copyright
75+
76+
# Install libwacom9-surface (v2 library only)
77+
cd $(SRC_V2) && DESTDIR=$(CURDIR)/debian/libwacom9-surface ninja install -C build
78+
rm -rf debian/libwacom9-surface/usr/bin
79+
rm -rf debian/libwacom9-surface/usr/include
80+
rm -rf debian/libwacom9-surface/usr/lib/udev
81+
rm -rf debian/libwacom9-surface/usr/lib/x86_64-linux-gnu/pkgconfig
82+
rm -rf debian/libwacom9-surface/usr/lib/x86_64-linux-gnu/libwacom.so
83+
rm -rf debian/libwacom9-surface/usr/share
84+
install -D -m644 $(SRC_V2)/COPYING debian/libwacom9-surface/usr/share/doc/libwacom9-surface/copyright
85+
86+
# Install libwacom9-dev-surface (v2 dev files only)
87+
cd $(SRC_V2) && DESTDIR=$(CURDIR)/debian/libwacom9-dev-surface ninja install -C build
88+
rm -rf debian/libwacom9-dev-surface/usr/bin
89+
rm -rf debian/libwacom9-dev-surface/usr/lib/udev
90+
rm -rf debian/libwacom9-dev-surface/usr/lib/x86_64-linux-gnu/libwacom.so.*
91+
rm -rf debian/libwacom9-dev-surface/usr/share
92+
install -D -m644 $(SRC_V2)/COPYING debian/libwacom9-dev-surface/usr/share/doc/libwacom9-dev-surface/copyright
93+
94+
# Install libwacom-bin-surface (v2 utilities)
95+
cd $(SRC_V2) && DESTDIR=$(CURDIR)/debian/libwacom-bin-surface ninja install -C build
96+
rm -rf debian/libwacom-bin-surface/usr/include
97+
rm -rf debian/libwacom-bin-surface/usr/lib
98+
rm -rf debian/libwacom-bin-surface/usr/share/libwacom
99+
install -D -m644 $(SRC_V2)/COPYING debian/libwacom-bin-surface/usr/share/doc/libwacom-bin-surface/copyright
100+
101+
# Install libwacom-common-surface (v2 data files)
102+
cd $(SRC_V2) && DESTDIR=$(CURDIR)/debian/libwacom-common-surface ninja install -C build
103+
rm -rf debian/libwacom-common-surface/usr/bin
104+
rm -rf debian/libwacom-common-surface/usr/include
105+
rm -rf debian/libwacom-common-surface/usr/lib/x86_64-linux-gnu
106+
rm -rf debian/libwacom-common-surface/usr/share/man
107+
install -D -m644 $(SRC_V2)/COPYING debian/libwacom-common-surface/usr/share/doc/libwacom-common-surface/copyright
108+
109+
%:
110+
dh $@

pkg/deb/makedeb

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
set -e
3+
4+
branch="HEAD"
5+
basepath="pkg/deb"
6+
7+
8+
pushd() {
9+
command pushd "$@" > /dev/null
10+
}
11+
12+
popd() {
13+
command popd "$@" > /dev/null
14+
}
15+
16+
17+
chkdir() {
18+
if [ ! -d ".git" ]
19+
then
20+
echo "Error: Script must be run from the root directory"
21+
exit 1
22+
fi
23+
}
24+
25+
prepare() {
26+
archive="src.tar"
27+
28+
git archive --format tar "$branch" > "$basepath/$archive"
29+
30+
mkdir -p "$basepath/src"
31+
tar xf "$basepath/$archive" --directory "$basepath/src"
32+
33+
cp -r "$basepath/debian" "$basepath/src/"
34+
35+
# Copy patches directory into src
36+
cp -r "patches" "$basepath/src/"
37+
}
38+
39+
build() {
40+
pushd "$basepath/src"
41+
dpkg-buildpackage -b -d -us -uc
42+
popd
43+
}
44+
45+
46+
chkdir
47+
prepare
48+
build

pkg/debian/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)