bigbigmdm / IMSProg

IMSProg - software for CH341A-based programmers to work with I2C, SPI and MicroWire EEPROM/Flash chips
https://antenna-dvb-t2.ru/IMSProg.php
GNU General Public License v3.0
215 stars 38 forks source link

How to pack into .deb and .rpm files #38

Closed mrv96 closed 7 months ago

mrv96 commented 7 months ago

Can you add to README.md the instructions to create .deb / .rpm after compilation?

bigbigmdm commented 7 months ago

I'm not the one putting together the RPM packages. I can't help you there yet. I can write about DEB-packages, but I doubt that this information is needed in README.md. I have written in detail how to build with CMake. DEB packages are downloaded automatically when new versions are released from Launchpad repository.

P.S.. Creating a DEB package:

cd imsprog-1.1.3
dpkg-buildpackage -T clean

dh_make --createorig
debuild -S -us -uc -sa
dpkg-buildpackage -rfakeroot -us -uc
mrv96 commented 7 months ago

Thank you very much!

P.S. since you already use cmake, wouldn't it be easier to use cpack?

bigbigmdm commented 7 months ago

One of my goals is to publish a package to Debian and Ubuntu. They have a number of strict requirements for all files. For example, I have redone the debian/control file about thirty times. Here you can see a list of current errors: https://mentors.debian.net/package/imsprog/

mrv96 commented 7 months ago

I know, it's quite tricky. When you have done it may be useful to have something like a Makefile target in order to create .deb simply with something like: make package

bigbigmdm commented 7 months ago

Yes, you are right. I still need to add encryption key signatures to the files and send them to ubuntu/debian.

P.S. A utility to test the package:

lintian -i -I --show-overrides imsprog_1.1.3-3_amd64.deb lintian -i -I --show-overrides imsprog_1.1.3-3-3.dsc lintian -i -I --show-overrides imsprog_1.1.3.3-3_source.changes

bigbigmdm commented 7 months ago

ok

Fantu commented 7 months ago

Small update for users that want to build deb package: Go to debian/latest branch, the packaging for official build, it can be used also for manual build on some older Debian/Ubuntu. For build binary on the current system simply do: dpkg-buildpackage -b -us -uc For build on clean environment outside (for example sending to launchpad or own build system: gbp buildpackage --git-builder='debuild -d -S -sa'

bigbigmdm commented 7 months ago

Thank you, @Fantu!