Skip to content

Commit 4e4851f

Browse files
committed
Add debian package files
1 parent 777893d commit 4e4851f

File tree

7 files changed

+106
-0
lines changed

7 files changed

+106
-0
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
all: build
2+
3+
build:
4+
npm run build
5+
6+
clean:
7+
rm -rf build
8+
9+
install:
10+
cd build && find . -type f -exec install -Dm 644 "{}" "$(DESTDIR)/usr/share/snapweb/{}" \;

debian/changelog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
snapweb (0.0.0-1) unstable; urgency=medium
2+
3+
* Placeholder for changelog
4+
* Content should be created with `changelog_md2deb.py`
5+
6+
-- Johannes Pohl <snapweb@badaix.de> Tue, 20 Feb 2024 18:10:40 +0000
7+

debian/changelog_md2deb.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
#
4+
# This file is part of snapos
5+
# Copyright (C) 2022 Johannes Pohl
6+
#
7+
# This program is free software: you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 3 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# This program is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License
18+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
20+
import sys
21+
import re
22+
23+
if __name__ == "__main__":
24+
if len(sys.argv) != 2:
25+
print(f"Usage: changelog_md2deb.py <changelog.md file>")
26+
sys.exit(1)
27+
28+
with open(sys.argv[1], 'r') as file:
29+
data = file.read()
30+
31+
data = re.sub('^\s*# Snapweb changelog *\n*',
32+
'', data, flags=re.MULTILINE)
33+
data = re.sub('^\s*### ([a-zA-Z]+) *\n',
34+
r'\n * \1\n', data, flags=re.MULTILINE)
35+
data = re.sub('^\s*## Version\s+(\S*) *\n',
36+
r'snapweb (\1-1) unstable; urgency=medium\n', data, flags=re.MULTILINE)
37+
data = re.sub('^\s*-\s*(.*) *\n', r' -\1\n', data, flags=re.MULTILINE)
38+
data = re.sub('^_(.*)_ *\n', r' -- \1\n\n', data, flags=re.MULTILINE)
39+
40+
print(data)

debian/control

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Source: snapweb
2+
Section: sound
3+
Priority: optional
4+
Maintainer: Johannes Pohl <snapweb@badaix.de>
5+
Build-Depends: debhelper-compat (= 13)
6+
Standards-Version: 4.5.1
7+
Homepage: https://github.com/badaix/snapweb
8+
Vcs-Git: https://github.com/badaix/snapweb.git
9+
Vcs-Browser: https://github.com/badaix/snapweb
10+
11+
Package: snapweb
12+
Architecture: all
13+
Depends: ${misc:Depends}
14+
Description: Web client for Snapcast
15+
Web client for Snapcast with control and playback capabilities.

debian/copyright

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: Snapweb
3+
Upstream-Contact: Johannes Pohl <snapweb@badaix.de>
4+
Source: https://github.com/badaix/snapweb
5+
6+
Files: *
7+
Copyright: 2020-2024 Johannes Pohl
8+
License: GPL-3+

debian/rules

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/make -f
2+
# See debhelper(7) (uncomment to enable)
3+
# output every command that modifies files on the build system.
4+
# export DH_VERBOSE = 1
5+
6+
7+
# see FEATURE AREAS in dpkg-buildflags(1)
8+
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
9+
10+
# see ENVIRONMENT in dpkg-buildflags(1)
11+
# package maintainers to append CFLAGS
12+
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
13+
# package maintainers to append LDFLAGS
14+
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
15+
16+
17+
%:
18+
dh $@
19+
20+
21+
# dh_make generated override targets
22+
# This is example for Cmake (See https://bugs.debian.org/641051 )
23+
#override_dh_auto_configure:
24+
# dh_auto_configure -- \
25+
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

debian/source/format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (quilt)

0 commit comments

Comments
 (0)