-
Notifications
You must be signed in to change notification settings - Fork 3
How to create debian control files
This page documents the steps for creating the debian control files required for the packaging launchpad packaging process (as well, presumably, as any other debian package creation mechanism).
NB: perhaps we need to revisit these to use pbuilder for a clean chroot, so that all the dependencies can easily be removed once compiling is complete.
These have been tested on Lubuntu 17.04 and 15.04
These are the steps you need from scratch
### set up your computer ###
# install required packages
sudo apt-get install -y dh-make git-core
### copy the repo locally ###
# If you have not already cloned the github repo locally, do this now
git clone https://github.com/artmg/Nixnote2.git
cd Nixnote2
# otherwise fetch any new commits from the forked
git fetch origin
### get changes from the repo this was forked from ###
# check whether you have already linked to the upstream repo
git remote -v
# if not then add
git remote add upstream https://github.com/baumgarr/Nixnote2.git
# fetch new commits from upstream (where this repo was forked from)
git fetch upstream
### identify yourself ###
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
For ideas on improving authentication, like using a personal access token, see [https://github.com/artmg/lubuild/blob/master/help/use/GitHub-source-control.md#authentication]
Each time you wish to check the debian files are up to date, this is what you can do...
### folder names
FOLDER_FORK=NixNote2.fork
FOLDER_PACK=NixNote2-Packaging.files
### update the fork from the upstream ###
cd ../$FOLDER_FORK
# get the latest upstream
git fetch upstream
# sync these upstream commits into the master for this forked repo
git checkout master
git merge upstream/master
# and push these changes back up to the fork
git push origin master
### pull the latest packaging files
cd ../$FOLDER_PACK
# get the latest upstream
git pull
### check out the differences
cd ..
diff -y $FOLDER_FORK/changelog.txt $FOLDER_PACK/debian/changelog
diff -y $FOLDER_FORK/package_scripts/deb/control $FOLDER_PACK/debian/control
diff -y $FOLDER_FORK/copyright $FOLDER_PACK/debian/copyright
Once you have worked out what changes you need to make to the nixnote packaging files:
- edit and save your changes to the files
- Commit and Push to Github
- if you're in a hurry:
# dh-make option switches - USED
#
# -p, --packagename - specify name_version in place of directory name
# -i, --indep - package class is arch-independent binary
#
# --createorig - not sure whether the version 1.20140617 uses this switch
#
# NOT USED
#
# -a, --addmissing - Adds missing example and control files existing debian source directory
# -d, --defaultless - Skips applying default templates to target debian directory
DEBFULLNAME="Randy Baumgarte" \
dh_make --createorig --packagename nixnote2_2.0-beta \
--indep --copyright gpl2 \
--email [email protected]
# only take changelog,compat,rules,control from debian folder
# credit - https://faceted.wordpress.com/2011/05/18/howto-build-a-trivial-debian-package-with-dh_make/
mkdir ../debian-from-dh-make
mv debian/{changelog,compat,rules,control} ../debian-from-dh-make
If all this fails then try the longer-winded approach from
https://bhavyanshu.me/how-to-make-debian-packages-for-qt-c-based-applications/11/10/2014/