Skip to content

Commit 2ec54b4

Browse files
committed
chore: move debian packaging definition from dqlite-ppa (#818)
1 parent f096f89 commit 2ec54b4

11 files changed

Lines changed: 108 additions & 16 deletions

.github/workflows/packages.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,21 @@ on:
55
- master
66
jobs:
77
build:
8-
if: github.repository == 'canonical/dqlite'
8+
runs-on: ubuntu-22.04
9+
environment:
10+
name: ppa
911
strategy:
1012
fail-fast: false
1113
matrix:
1214
target:
1315
- jammy
1416
- noble
1517
- plucky
16-
runs-on: ubuntu-22.04
17-
environment:
18-
name: ppa
1918
steps:
20-
- name: Clone the repositories
21-
run: |
22-
git clone https://github.com/canonical/dqlite
23-
git clone https://github.com/canonical/dqlite-ppa -b dqlite --depth 1
19+
- uses: actions/checkout@v5
20+
with:
21+
fetch-depth: 0
22+
fetch-tags: true
2423

2524
- name: Setup dependencies
2625
run: |
@@ -36,10 +35,6 @@ jobs:
3635
run: |
3736
echo "$PPA_SECRET_KEY" > private-key.asc
3837
gpg --import --batch private-key.asc
39-
40-
- name: Delete GPG signing key file
41-
if: always()
42-
run: |
4338
rm -f private-key.asc
4439
4540
- name: Build source package
@@ -48,8 +43,6 @@ jobs:
4843
DEBEMAIL: "dqlitebot@lists.canonical.com"
4944
TARGET: ${{ matrix.target }}
5045
run: |
51-
cp -R dqlite-ppa/debian dqlite/
52-
cd dqlite/
5346
VERSION="$(git describe --tags | sed -e "s/^v//" -e "s/-/+git/")"
5447
dch --create \
5548
--distribution ${TARGET} \
@@ -60,4 +53,4 @@ jobs:
6053
6154
- name: Upload to Launchpad
6255
run: |
63-
dput -U -u ppa:dqlite/dev *.changes
56+
(cd .. && dput -U -u ppa:dqlite/dev *.changes)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ All files in this repository are licensed as follows. If you contribute
22
to this repository, it is assumed that you license your contribution
33
under the same license unless you state otherwise.
44

5-
All files Copyright (C) 2017-2019 Canonical Ltd. unless otherwise specified in
5+
All files Copyright (C) 2017-2025 Canonical Ltd. unless otherwise specified in
66
the file.
77

88
This software is licensed under the LGPLv3, included below.

debian/compat

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

debian/control

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Source: dqlite
2+
Section: devel
3+
Priority: optional
4+
Maintainer: Marco Manino <marco.manino@canonical.com>
5+
Build-Depends: debhelper (>= 10),
6+
pkgconf,
7+
libsqlite3-dev,
8+
libuv1-dev,
9+
liblz4-dev
10+
Homepage: https://github.com/canonical/dqlite
11+
Standards-Version: 4.5.1
12+
Rules-Requires-Root: no
13+
14+
Package: libdqlite1.18-unstable
15+
Section: libs
16+
Architecture: any
17+
Depends: ${shlibs:Depends}, ${misc:Depends}
18+
Multi-Arch: same
19+
Pre-Depends: ${misc:Pre-Depends}
20+
Description: Distributed SQLite database using Raft - library
21+
libdqlite is a SQLite and Raft based distributed database.
22+
.
23+
This package contains the library itself.
24+
25+
Package: libdqlite1.18-unstable-dev
26+
Section: libdevel
27+
Architecture: any
28+
Depends: libdqlite1.18-unstable (= ${binary:Version}),
29+
${misc:Depends},
30+
libsqlite3-dev,
31+
libuv1-dev,
32+
liblz4-dev
33+
Multi-Arch: same
34+
Description: Distributed SQLite database using Raft - library
35+
libdqlite is a SQLite and Raft based distributed database.
36+
.
37+
This package contains the development files (headers, static libraries)

debian/copyright

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: dqlite
3+
Upstream-Contact: marco.manino@canonical.com
4+
Source: https://github.com/canonical/dqlite
5+
6+
Files: *
7+
Copyright: 2017-2025 Canonical Ltd.
8+
License: LGPL-3
9+
10+
License: LGPL-3
11+
This package is free software; you can redistribute it and/or
12+
modify it under the terms of the GNU Lesser General Public
13+
License as published by the Free Software Foundation.
14+
.
15+
This package is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18+
Lesser General Public License for more details.
19+
.
20+
You should have received a copy of the GNU Lesser General Public
21+
License along with this package; if not, write to the Free Software
22+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23+
.
24+
On Debian systems, the complete text of the GNU Lesser General
25+
Public License can be found in `/usr/share/common-licenses/LGPL-3'.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
usr/include
2+
usr/lib
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
usr/include/*.h
2+
usr/lib/*/libdqlite.a
3+
usr/lib/*/libdqlite.so
4+
usr/lib/*/pkgconfig/dqlite.pc

debian/libdqlite1.18-unstable.dirs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
usr/lib
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
usr/lib/*/libdqlite.so.*

debian/rules

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/make -f
2+
# -*- makefile -*-
3+
4+
include /usr/share/dpkg/default.mk
5+
6+
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
7+
export DEB_CFLAGS_MAINT_APPEND = -Werror
8+
9+
export SOVER=0
10+
export SONAME=libdqlite.so.$(SOVER)
11+
export SOPKG=libdqlite$(SOVER)
12+
13+
export LIBDQLITE_TRACE=1
14+
15+
%:
16+
dh $@ --with autoreconf
17+
18+
override_dh_auto_configure:
19+
dh_auto_configure -- --enable-build-raft
20+
21+
override_dh_auto_test:
22+
# Tests consume a lot of resources on
23+
# smaller systems so it is best not to
24+
# run them in parallel. Build can still
25+
# be parallelized as usual.
26+
$(MAKE) -j$(shell nproc) check-norun
27+
$(MAKE) -j1 check

0 commit comments

Comments
 (0)