Build and include documentation included upstream

This commit is contained in:
alan (NyxTrail) 2024-06-19 08:41:16 +00:00
parent 3c0f9df772
commit ed2ca9e363
No known key found for this signature in database
GPG Key ID: 32C5D29762C48D4A
3 changed files with 32 additions and 5 deletions

3
debian/control vendored
View File

@ -4,6 +4,7 @@ Priority: optional
Maintainer: Alan M Varghese (NyxTrail) <alan@digistorm.in>
Build-Depends: debhelper-compat (= 13),
python3,
python3-sphinx,
pandoc
Standards-Version: 4.6.2
Homepage: https://github.com/canihavesomecoffee/udis86
@ -53,7 +54,7 @@ Package: libudis86-doc
Section: doc
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}
Depends: ${misc:Depends}, ${sphinxdoc:Depends}
Description: Disassembler for x86 and x86-64 class ISA (documentation)
Udis86 is a disassembler for the x86 and x86-64 class of instruction
set architectures. It consists of a C library called libudis86 which

16
debian/libudis86-doc.doc-base.udis86 vendored Normal file
View File

@ -0,0 +1,16 @@
Document: udis86-documentation
Title: udis86 disassembler Documentation
Abstract: Generated documentation for udis86 disassembler.
Udis86 is a disassembler engine that decodes a stream of
binary machine code bytes as opcodes defined in the x86
and x86-64 class of Instruction Set Architectures. The
core component of this project is libudis86 which provides
a clean and simple interface to disassemble binary code,
and to inspect the disassembly to various degrees of detail.
The library is designed to aid software projects that entail
analysis and manipulation of all flavors of x86 binary code.
Section: Programming/C
Format: HTML
Files: /usr/share/doc/udis86/html/*
Index: /usr/share/doc/udis86/html/index.html

18
debian/rules vendored
View File

@ -5,17 +5,27 @@ export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1
%:
dh $@ --with autoreconf
dh $@ --with autoreconf,sphinxdoc
override_dh_autoreconf:
dh_autoreconf -- ./autogen.sh
override_dh_auto_build:
dh_auto_build
sphinx-build -c docs/manual -bhtml docs/manual docs/manual/html
# override_dh_autoreconf:
#dh_autoreconf -- ./autogen.sh
override_dh_auto_configure:
dh_auto_configure -- --with-python=/usr/bin/python3
override_dh_auto_install:
mkdir -p debian/tmp/usr/share/doc/udcli
mkdir -p debian/tmp/usr/share/doc/udcli \
debian/tmp/usr/share/doc/udis86/html \
debian/tmp/usr/share/doc/udis86/x86
mv docs/manual/html debian/tmp/usr/share/doc/udis86/
cp docs/x86/avx.xml docs/x86/README debian/tmp/usr/share/doc/udis86/x86/
pandoc debian/udcli.1.rst --standalone \
--variable=header:"udcli User Manual" \
--variable=section:1 \
--from rst \
--to man > debian/tmp/usr/share/doc/udcli/udcli.1
dh_auto_install
override_dh_auto_clean:
dh_auto_clean
rm -rf debian/doctrees