I have a bunch of helpful utility scripts under a personal private repo on git where I have not bothered with branches/tags etc as the were not necessary.
Recently I thought I'd see about creating debian packages for some of them, my current build process is:
- Create directory package_name-version.
- Copy binary and man page from repo location to this location.
dh_make --createorig
- setup
copyright
/changelog
/install
/control
/manpages files within createddebian/
dir dpkg-buildpackage -rfakeroot
I was reading more and came across git-buildpackage realising it could create the changelog from the git commits and tags, make the whole process simpler and have it properly versioned.
I've extracted the script and manpage to another repo by:
cd /path/to/old-repo
git format-patch --stdout --root -- <path> >~/patches
cd /path/to/new_repo
git am ~/patches
so now in the new repo root I have a script and manpage.
I've looked at https://wiki.debian.org/PackagingWithGit which mail seems to dealing with repos already configured for doing this as it's referencing .orig.tar.gz files and upstream releases.
I'm struggling with understanding how to change the structure of my new repo (with a script and a manpage) to what it should be.
I understand I need to alter the structure, create tags for versions, create branches but not sure of the structure and git commands.
If anyone can provide assistance in this or outline the entire process it would be appreciated.
Sorry for the length.