Skip to content

Commit f77431e

Browse files
Debian packaging
1 parent b28db1e commit f77431e

12 files changed

+128
-12
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
target/
22
.vscode/
33
.cache/
4-
service.xml

Makefile

+28-11
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
#/usr/bin/make -f
2+
13
INSTALL = install
24
INSTALL_PROGRAM = ${INSTALL} -D -m 0755
35
INSTALL_DATA = ${INSTALL} -D -m 0644
46

5-
prefix = /usr
7+
prefix = ${DESTDIR}/usr
68
exec_prefix = $(prefix)
79
bindir = $(exec_prefix)/bin
810
datarootdir = $(prefix)/share
@@ -15,21 +17,38 @@ BIN_DB := trawldb
1517

1618
all: setup build
1719

20+
distclean: clean
21+
22+
clean:
23+
-cargo clean
24+
-rm -r client_api/build
25+
26+
build-arch: build
27+
28+
build-independent: build
29+
30+
binary: build
31+
32+
binary-arch: build
33+
34+
binary-independent: build
35+
1836
build: build-rust build-lib
1937

2038
setup: build-rust
2139
-make setup-lib
2240

23-
clean:
24-
cargo clean
25-
26-
install: setup build
27-
sudo $(INSTALL_PROGRAM) "./target/release/$(BIN_C)" "$(bindir)/$(BIN_C)"
28-
sudo $(INSTALL_PROGRAM) "./target/release/$(BIN_D)" "$(bindir)/$(BIN_D)"
29-
sudo $(INSTALL_PROGRAM) "./target/release/$(BIN_DB)" "$(bindir)/$(BIN_DB)"
30-
sudo $(INSTALL_DATA) "./$(BIN_D).service" "$(libdir)/systemd/user/$(BIN_D).service"
41+
install:
42+
$(INSTALL_PROGRAM) "./target/release/$(BIN_C)" "$(bindir)/$(BIN_C)"
43+
$(INSTALL_PROGRAM) "./target/release/$(BIN_D)" "$(bindir)/$(BIN_D)"
44+
$(INSTALL_PROGRAM) "./target/release/$(BIN_DB)" "$(bindir)/$(BIN_DB)"
45+
$(INSTALL_DATA) "./$(BIN_D).service" "$(libdir)/systemd/user/$(BIN_D).service"
3146
meson install -C client_api/build
3247

48+
gen-service-xml:
49+
./postbuild.sh
50+
51+
3352
uninstall:
3453
rm -f "$(bindir)/$(BIN_C)"
3554
rm -f "$(bindir)/$(BIN_D)"
@@ -53,12 +72,10 @@ code-coverage:
5372

5473
build-lib: build-rust
5574
cargo build --release
56-
./postbuild.sh
5775
meson compile -C client_api/build/
5876

5977
build-rust:
6078
cargo build --release
6179
./postbuild.sh
6280

6381

64-
.PHONY: all clean install uninstall setup setup-lib build build-rust build-lib test code-coverage

debian/README.Debian

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
trawl for Debian
2+
3+
Please edit this to provide information specific to
4+
this trawl Debian package.
5+
6+
(Automatically generated by debmake Version 4.3.2)
7+
8+
-- Soumya Ranjan Patnaik <soumyaranjan1812@gmail.com> Mon, 25 Jul 2022 02:00:22 +0530

debian/changelog

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
trawl (0.1-1) unstable; urgency=low
2+
3+
* Initial release.
4+
5+
-- Soumya Ranjan Patnaik <soumyaranjan1812@gmail.com> Mon, 25 Jul 2022 02:00:22 +0530

debian/compat

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

debian/control

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Source: trawl
2+
Section: unknown
3+
Priority: optional
4+
Maintainer: Soumya Ranjan Patnaik <soumyaranjan1812@gmail.com>
5+
Build-Depends: cargo, debhelper
6+
Standards-Version: 4.5.0
7+
8+
Package: trawl
9+
Architecture: any
10+
Multi-Arch: foreign
11+
Depends: ${misc:Depends}, ${shlibs:Depends}
12+
Description: A display agnostic Config Manager

debian/copyright

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: trawl
3+
Upstream-Contact: <https://github.com/regolith-linux/trawl>
4+
Source: <preferred name and address to reach the upstream project>
5+
#
6+
# Please double check copyright with the licensecheck(1) command.
7+
8+
Files: .gitignore
9+
Cargo.lock
10+
Cargo.toml
11+
Makefile
12+
README.md
13+
client_api/.gitignore
14+
client_api/client_api.c
15+
client_api/client_api.h
16+
client_api/example/main.c
17+
client_api/example/meson.build
18+
client_api/meson.build
19+
client_api/scripts/run_codegen.sh
20+
client_api/scripts/uninstall.sh
21+
examples/partials.d/swayidle
22+
examples/resources
23+
postbuild.sh
24+
trawlcat/Cargo.toml
25+
trawlcat/src/main.rs
26+
trawld.service
27+
trawld/Cargo.toml
28+
trawld/src/common.rs
29+
trawld/src/lib.rs
30+
trawld/src/log.rs
31+
trawld/src/main.rs
32+
trawld/src/parser.rs
33+
trawld/src/tests.rs
34+
trawldb/Cargo.toml
35+
trawldb/src/lib.rs
36+
trawldb/src/main.rs
37+
trawldb/src/manager.rs
38+
trawldb/src/parser.rs
39+
trawldb/tests/common.rs
40+
trawldb/tests/integration_tests.rs
41+
License: __UNKNOWN__
42+
Licensed under either of
43+
.
44+
* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
45+
.
46+
* [MIT license](http://opensource.org/licenses/MIT)
47+
.
48+
at your option.
49+
50+
51+
#----------------------------------------------------------------------------
52+
# Files marked as NO_LICENSE_TEXT_FOUND may be covered by the following
53+
# license/copyright files.

debian/patches/series

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# You must remove unused comment lines for the released package.

debian/rules

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/make -f
2+
# You must remove unused comment lines for the released package.
3+
#export DH_VERBOSE = 1
4+
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
5+
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
6+
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
7+
8+
%:
9+
dh $@
10+
11+
#override_dh_auto_install:
12+
# dh_auto_install -- prefix=/usr
13+
14+
#override_dh_install:
15+
# dh_install --list-missing -X.pyc -X.pyo

debian/source/format

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (quilt)

debian/source/local-options

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#abort-on-upstream-changes
2+
#unapply-patches

debian/watch

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# You must remove unused comment lines for the released package.
2+
version=3

0 commit comments

Comments
 (0)