summaryrefslogtreecommitdiff
path: root/docs/packaging/basics.md
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-07-02 17:35:02 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-07-02 17:35:02 -0300
commit53e1b44d87c32676da33074925f776a9fc4dd7ff (patch)
tree2fdbf41e968562949223fbec1e0a90822a7b7026 /docs/packaging/basics.md
parentb301abacd5ae122bce7a56ae73026108063421bb (diff)
downloaddebian-53e1b44d87c32676da33074925f776a9fc4dd7ff.tar.gz
debian-53e1b44d87c32676da33074925f776a9fc4dd7ff.tar.bz2
Feat: make the project more general
Diffstat (limited to 'docs/packaging/basics.md')
-rw-r--r--docs/packaging/basics.md74
1 files changed, 74 insertions, 0 deletions
diff --git a/docs/packaging/basics.md b/docs/packaging/basics.md
new file mode 100644
index 0000000..6eafa91
--- /dev/null
+++ b/docs/packaging/basics.md
@@ -0,0 +1,74 @@
+# Basic packaging
+
+## Configuration files
+
+All the commands in this guide assumes that you're using [these configuration
+files](https://git.fluxo.info/?p=rhatto/dotfiles/debian.git;a=summary).
+
+## Starting a new package
+
+We use the `packages/` folder from this repo to store sources:
+
+ mkdir packages/$package
+ cd packages/$package
+
+## Getting the debianized source
+
+Using `dget`:
+
+ dget $remote_dsc
+ cd $package*
+
+Using `apt-get`:
+
+ apt-get source package
+
+## Checking the source
+
+See `checking.md`.
+
+## Extracting the source
+
+If needed, do this after your successfully verified the sources:
+
+ dpkg-source -x *.dsc
+
+## Getting dependencies
+
+To get:
+
+ apt-get build-dep package
+
+To remove:
+
+ hydractl remove-dep package
+
+## Creating the `debian/` structure
+
+If the package wasn't debianized, proceed with
+
+ if [ ! -d "debian" ]; then
+ dh_make -p ${package}_${version} --createorig
+ fi
+
+## Simple build
+
+ dch -i
+ dpkg-buildpackage -rfakeroot -sa -k$KEY_ID
+
+## Creating a new debian source
+
+ cd ..
+ dpkg-source -b $package*
+ debsign $package*.dsc
+
+## Building and signing
+
+To generate signatures, remove `-uc` and `-us` from `dpkg-buildpackage` (see
+[Complete build](http://www.debian.org/doc/maint-guide/ch-build.pt-br.html#s-completebuild)):
+
+ dpkg-buildpackage -rfakeroot
+
+To sign using an specific key:
+
+ dpkg-buildpackage -rfakeroot -kKEY_ID