Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding debian support #126

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions debian/README.Debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
geekodoc for Debian
------------------

* several wheel python modules are needed to build the package properly,
see the `pypi` subdirectory

-- Tomáš Bažant <[email protected]> Fri, 08 Dec 2023 14:47:25 +0100
3 changes: 3 additions & 0 deletions debian/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Try building `python3 -m venv .venv` with `--system-site-packages`,
update the `control` file with dependencies and possibly remove one
or more python wheel packges in favour of system ones
30 changes: 30 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
geekodoc (2.3.2-2) UNRELEASED; urgency=medium

* aligned symlinks for rng and rnc files and directories
* limited the number of distributed schema files

-- Tomáš Bažant <[email protected]> Thu, 07 Mar 2024 13:56:34 +0100

geekodoc (2.3.2-1) unstable; urgency=medium

* small text-flow improvements

-- Tomáš Bažant <[email protected]> Thu, 07 Mar 2024 12:00:55 +0100

geekodoc (2.3.2-0) unstable; urgency=medium

* Added geekodoc v2 RNG file mapping.

-- Tomáš Bažant <[email protected]> Tue, 05 Mar 2024 17:28:25 +0100

geekodoc (2.3.1-0) unstable; urgency=medium

* Updating to the latest version 2.3.1.

-- Tomáš Bažant <[email protected]> Tue, 05 Mar 2024 13:37:40 +0100

geekodoc (2.2.2-2) unstable; urgency=medium

* Initial release. Properly repackaged.

-- Tomáš Bažant <[email protected]> Fri, 08 Dec 2023 14:47:25 +0100
26 changes: 26 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Source: geekodoc
Section: doc
Priority: optional
Maintainer: Tomáš Bažant <[email protected]>
Rules-Requires-Root: no
Build-Depends:
debhelper-compat (= 13),
xml-core,
python3-venv,
libxslt-dev,
python3-dev,
jing,
trang,
libxml2-utils
Standards-Version: 4.6.2
Homepage: https://github.com/openSUSE/geekodoc

Package: geekodoc
Architecture: all
Depends:
${shlibs:Depends},
${misc:Depends},
Description: A RELAX NG schema and a subset of DocBook 5.
It restricts the content model of some elements and attributes to make it
easier to write documents. Valid GeekoDoc documents are also valid DocBook 5
documents.
25 changes: 25 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/openSUSE/geekodoc
Upstream-Name: geekodoc
Upstream-Contact: Tom Schraitle, https://github.com/tomschr

Files:
debian/*
Copyright:
2023 Tomáš Bažant <[email protected]>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
Comment:
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
2 changes: 2 additions & 0 deletions debian/geekodoc-docs.docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
README.source
README.Debian
5 changes: 5 additions & 0 deletions debian/geekodoc.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#build/geekodoc/rng usr/share/xml/geekodoc
build/geekodoc/rng/1_5.1/geekodoc-v1-flat.rnc /usr/share/xml/geekodoc/rng/1_5.1/
build/geekodoc/rng/1_5.1/geekodoc-v1-flat.rng /usr/share/xml/geekodoc/rng/1_5.1/
build/geekodoc/rng/2_5.2/geekodoc-v2-flat.rnc /usr/share/xml/geekodoc/rng/2_5.2/
build/geekodoc/rng/2_5.2/geekodoc-v2-flat.rng /usr/share/xml/geekodoc/rng/2_5.2/
7 changes: 7 additions & 0 deletions debian/geekodoc.links
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/usr/share/xml/geekodoc/rng/1_5.1/geekodoc-v1-flat.rnc /usr/share/xml/geekodoc/rng/1_5.1/geekodoc5-flat.rnc
/usr/share/xml/geekodoc/rng/1_5.1/geekodoc-v1-flat.rng /usr/share/xml/geekodoc/rng/1_5.1/geekodoc5-flat.rng
/usr/share/xml/geekodoc/rng/1_5.1/geekodoc-v1-flat.rnc /usr/share/xml/geekodoc/rng/geekodoc5-flat.rnc
/usr/share/xml/geekodoc/rng/1_5.1/geekodoc-v1-flat.rng /usr/share/xml/geekodoc/rng/geekodoc5-flat.rng
/usr/share/xml/geekodoc/rng/2_5.2/geekodoc-v2-flat.rng /usr/share/xml/geekodoc/rng/geekodoc-latest-flat.rng
/usr/share/xml/geekodoc/rng/2_5.2/geekodoc-v2-flat.rnc /usr/share/xml/geekodoc/rng/geekodoc-latest-flat.rnc
/usr/share/xml/geekodoc/rng/2_5.2 /usr/share/xml/geekodoc/rng/latest
7 changes: 7 additions & 0 deletions debian/geekodoc.xmlcatalogs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
local;catalog.d/geekodoc.xml;/usr/share/xml/geekodoc/catalog-geekodoc.xml

root-and-package;system;https://github.com/openSUSE/geekodoc/;/usr/share/xml/geekodoc/catalog-geekodoc.xml
root-and-package;system;urn:x-suse:rnc:v1:geekodoc-flat;/usr/share/xml/geekodoc/catalog-geekodoc.xml
root-and-package;system;urn:x-suse:rnc:v2:geekodoc-flat;/usr/share/xml/geekodoc/catalog-geekodoc.xml
root-and-package;system;urn:x-suse:rng:v1:geekodoc-flat;/usr/share/xml/geekodoc/catalog-geekodoc.xml
root-and-package;system;urn:x-suse:rng:v2:geekodoc-flat;/usr/share/xml/geekodoc/catalog-geekodoc.xml
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update-buildsh.patch
20 changes: 20 additions & 0 deletions debian/patches/update-buildsh.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/build.sh
+++ b/build.sh
@@ -151,7 +151,7 @@
# * jing
# * python3-rnginline (from obs://devel:languages:python/python3-rnginline)
# * docbook_5 (from obs://Publishing)
- local SCRIPTS="trang jing rnginline"
+ local SCRIPTS="trang jing .venv/bin/rnginline"
tbazant marked this conversation as resolved.
Show resolved Hide resolved

for prog in $SCRIPTS; do
if ! command -v $prog >/dev/null; then
@@ -207,7 +207,7 @@
rng="$f.rng"
rni="$f-flat.rni"
logdebug "Converting $rng -> $rni"
- rnginline "$rng" "$rni"
+ .venv/bin/rnginline "$rng" "$rni"
tbazant marked this conversation as resolved.
Show resolved Hide resolved
if [[ "$?" -ne 0 ]]; then
exit_on_error "Conversion from $rng -> $rni failed"
fi
Binary file added debian/pypi/docopt_ng-0.8.1-py2.py3-none-any.whl
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added debian/pypi/rnginline-1.0.0-py3-none-any.whl
Binary file not shown.
Binary file not shown.
Binary file added debian/pypi/zipp-3.17.0-py3-none-any.whl
Binary file not shown.
29 changes: 29 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/make -f

# See debhelper(7) (uncomment to enable)

# Output every command that modifies files on the build system.
export DH_VERBOSE = 1

%:
dh $@

override_dh_auto_build:
python3 -m venv .venv
bash -c 'source .venv/bin/activate'
.venv/bin/pip install debian/pypi/docopt_ng-0.8.1-py2.py3-none-any.whl
.venv/bin/pip install debian/pypi/zipp-3.17.0-py3-none-any.whl
.venv/bin/pip install debian/pypi/importlib_metadata-6.11.0-py3-none-any.whl
.venv/bin/pip install debian/pypi/lxml-4.9.3-cp311-cp311-manylinux_2_28_x86_64.whl
.venv/bin/pip install debian/pypi/typing_extensions-4.9.0-py3-none-any.whl
.venv/bin/pip install debian/pypi/rnginline-1.0.0-py3-none-any.whl
Comment on lines +14 to +19
Copy link
Contributor

@tomschr tomschr Mar 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to install these from PyPI (remote)? If not, could they be stored in the OBS repo instead of here?

./build.sh

override_dh_auto_clean:
rm -rf .venv dist/ build/

override_dh_auto_install:
dh_install

override_dh_install:
dh_installxmlcatalogs
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
6 changes: 6 additions & 0 deletions debian/source/include-binaries
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
debian/pypi/docopt_ng-0.8.1-py2.py3-none-any.whl
debian/pypi/rnginline-1.0.0-py3-none-any.whl
debian/pypi/zipp-3.17.0-py3-none-any.whl
debian/pypi/importlib_metadata-6.11.0-py3-none-any.whl
debian/pypi/lxml-4.9.3-cp311-cp311-manylinux_2_28_x86_64.whl
debian/pypi/typing_extensions-4.9.0-py3-none-any.whl
5 changes: 5 additions & 0 deletions debian/upstream/metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bug-Database: https://github.com/openSUSE/geekodoc/issues
Bug-Submit: https://github.com/openSUSE/geekodoc/issues/new
Changelog: https://github.com/openSUSE/geekodoc/blob/main/ChangeLog
Repository-Browse: https://github.com/openSUSE/geekodoc
Repository: https://github.com/openSUSE/geekodoc.git
15 changes: 15 additions & 0 deletions debian/watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Example watch control file for uscan.
# Rename this file to "watch" and then you can run the "uscan" command
# to check for upstream updates and more.
# See uscan(1) for format.

# Compulsory line, this is a version 4 file.
version=4

# PGP signature mangle, so foo.tar.gz has foo.tar.gz.sig.
opts="pgpsigurlmangle=s%$%.sig%"

# GitHub hosted projects.
opts="filenamemangle=s%(?:.*?)?v?(@ANY_VERSION@@ARCHIVE_EXT@)%@PACKAGE@-$1%" \
https://github.com/openSUSE/geekodoc/tags \
(?:.*?/)v?@ANY_VERSION@@ARCHIVE_EXT@
Loading