See also [[debian-pkg]], [[Debian Repo]] apt-file (like Arch's [[pkgfile]]) All commands assume (unless otherwise noted) that PWD is the source dir of the upstream code, and that there is a `debian` repo in that directory. - build-directory - _____.orig.tar.gz - extracted-dir - source files ... - `debian` - _____-_____.{build,buildinfo,changes,deb,dsc} == Requirements == - devscripts == debmake == Creates a new `debian` directory. Assumes that - that `$PWD` is `-` - than `$PWD/../_.orig.tar.gz` exists == debuild == Builds a pakage. Runs `debian/rules build` to build package {{{ sudo debuild --no-sign }}} == Patches == https://www.debian.org/doc/manuals/debmake-doc/ch04.en.html#diff-u {{{ diff -Nru file.upstream file.changed > debian/patches/000-change-file.patch echo 000-change-file.patch >> debian/patches/series }}} == sections == https://packages.debian.org/stable/ == debian/watch == https://wiki.debian.org/debian/watch Specifies where to look for an newer version. By running `uscan`. It should download `../${PKG}-${NEW-VERSION}.tar.gz`, and sets up some symlinks for that debian might want. From there, extract and move the `debian` folder to the new directory. == Building == `debian/rules build` build the binaries, but not the package apt install debmake build-dep tree === Build dependencies === `mk-build-deps` :: Generarer ett paket från `debian/control`, vilket :: inte innehåller någonting, men beror på build-depends. `dpkg --fix-broken install ./-build-deps_-_all.deb` :: `apt install ./-build-deps_-_all.deb` :: :: Installerar det lokala paketet, med beroenden - # apt-get build-dep -build-deps_-_all.deb === Update changelog === ==== Creates new entry with verssion number ==== > dch --newversion -2.1 `-2` :: is debian package version, start at 2 to avoid lintian issue about [[https://wiki.debian.org/ITP|ITP]] `.1` :: Shows that this is an [[https://www.debian.org/doc/manuals/developers-reference/pkgs.html#nmus-and-debian-changelog|NMU]], since we aren't a Debian maintainer {{{ dch --release --no-force-save-on-release }}} === Figure out runtime dependencies === `objdump -p | grep NEEDED` -------------------------------------------------- - git-dch - apt build-dep == Other files == https://www.debian.org/doc/manuals/maint-guide/dother.en.html#install == All lintian errors == https://lintian.debian.org/tags