Fix debian packaging
please dont merge yet
the first commit is a bit big, sorry for that, but i kinda got ahead of me, and then i was too lazy to redo it heres what i did:
- removed all unused/unnecessary files from the debian directory(when there is need we can allways add stuff back piece by piece)
- i also removed the mutate/* files from the debian directory as those are autogenerated and not needed at all( and from my understanding should not be commited to version control)
- i changed the debian/copyright file to reflect the LICENSE file
- i changed the debian/docs file to only include Readme.md ( i dont think the binary package should contain any sourcecode, it can allways be retrieved from here or a resective source release tarball from github relases)
- i changed the debian/control file and moved all the build dependencies to the source package and added apropriate library/runtime dependencies to the binary package
- i also removed the postinst and postrm scripts as i think package installation scripts should not touch anything in a users homedirectory(i should probably add a README.Debian telling the users how to copy the example config files over)
- i added a toplevel qt project file that includes/points to src/ for the sourcecode compilation as otherwise dpkg-buildpackage would not have build anysourcode
- i renamed src/Mutate.pro to src/src.pro -- i think the name doesnt matter realy, we can change that back if you want.
- i removed the install targets from src/src.pro as those were not used in any installation instructions and its realy just a single executable no need for any install actions even when building from source
- then i finaly added debian/mutate.install it tells dpkg-buildpackage what files to install where
i can with that build a local package that only contains the executable/icon/desktopfile/exampleconfig and that requires no compilation when installing.
i have not yet tested to build/install it from a clean environment, i will do that in the next days/weeks if time permits.
This sounds awesome :+1:
Great work. I can merge this when you're finished.
I got an error caused by debian/changelog
dpkg-genchanges: error: unknown1 is not a valid version
There is a line missing before Initial Release. Here is a fix
diff --git a/debian/changelog b/debian/changelog
index 6084065..2b40462 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,7 @@ mutate (2.4~precise~NoolsLab.com) precise; urgency=low
-- Ian Glen <[email protected]> Sun, 26 Apr 2015 17:50:00 -0500
+mutate (2.3~precise~NoolsLab.com) precise; urgency=low
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
@mgolisch can you add this to your pullrequest? regards, David
@DavidWiesner thx, i fixed it. it now builds on a clean pbuilder chroot for trusty and vivid. Maybe we should also change the distribution reference in the changelog file as it doesnt build on precise at all as it has no qt5. Will test more versions and maybe also debian. Also with all the stuff i changed maybe someone should check the other package building things still work.
it also builds and install on debian jessie But for ubuntu wily it doesnt as it doesnt have libboost 1.55 but 1.58 Probably the only way to solve that is to test against those different library versions and create packaging branches for the different debian based distros one wants to build packages for
@mgolisch for platform specific dependecies you can also use the or statement: |
so e.g.:
Build-Depends: ..., libboost-regex1.55-dev | libboost-regex1.58-dev, ...
Depends ..., libboost-regex1.55.0 | libboost-regex1.58.0, ...
or for the Build-Depends you can use the version qualifier and the transition package libboost-regex-dev like:
Build-Depends: ..., libboost-regex-dev (>= 1.55.0), ...
yeah thought about that. For the Build-depends thats probably not a big deal ,but iam not sure what happens if the package was build against one version and then you try to run it against the other. iam sure it would install fine if the depends says libboost-regex1.55.0 | libboost-regex1.58.0. Not sure if thats a good idea.
i think with this we can build packages for all current ubuntu and debian versions from the same source. Thats good enough for me. Will rebase on master to get rid of the merge conflicts and maybe cleanup the commits a bit
i rebased on master to remove the merge conflicts. Maybe someone can try the other packaging stuff still works with this branch? also i build packages using this branch for the current ubuntu/debian versions. Maybe someone is willing to test if they work as expected? I uploaded the results to my website: http://build-out.mgolisch.eu/
@mgolisch I tested installing your mutate_2.4~precise~NoolsLab.com_amd64.deb on 15.10 and recvd this output:
sudo dpkg -i mutate_2.4~precise~NoolsLab.com_amd64.deb
Selecting previously unselected package mutate.
(Reading database ... 253819 files and directories currently installed.)
Preparing to unpack mutate_2.4~precise~NoolsLab.com_amd64.deb ...
Unpacking mutate (2.4~precise~NoolsLab.com) ...
dpkg: dependency problems prevent configuration of mutate:
mutate depends on libboost-regex1.58.0; however:
Package libboost-regex1.58.0 is not installed.
mutate depends on libqt5x11extras5 (>= 5.1.0); however:
Package libqt5x11extras5 is not installed.
dpkg: error processing package mutate (--install):
dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.13.3-6ubuntu1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu3) ...
Processing triggers for mime-support (3.58ubuntu1) ...
Errors were encountered while processing:
mutate
Should the dependencies be automatically installed? After manually installing libboost-regex1.58.0 libqt5x11extras5 mutate was configured automatically by dpkg. And it seems to work fine now.
no thats by design, dpkg does not try to install any dependencies. you could have used gdebi or just apt-get install -f after installation with dpkg to resolve the missing dependencies
Ah ok, thanks.