I have found a similar question on https://askubuntu.com/questions/144547/how-to-package-a-single-text-file-into-a-deb - unfortunately there is no answer I can use.
Basically, I want to manage a text file, say myapp.txt.config, in git; and then, I'd want to create a .deb package that copies it on Raspberry Pi in /usr/share/myapp/myapp.txt.config. However, most of the work I do in this repository is in MSYS2/MINGW64 on Windows 10, so I would like to avoid the round-trip to a Raspberry Pi, just to build the .deb package. Since this is just a text file, I'd like a single .deb to be valid for all distributions (stretch, bookworm for Raspbian).
How would I go about implementing this? I can see that a .deb file is an ar archive with tar archives inside - and there is working ar, tar, install, bash, python3, perl, make on MSYS2/MINGW64, however there are no Debian tools in the MSYS2/MINGW64 repos, as MSYS2 uses pacman instead.
I have seen in https://askubuntu.com/questions/90764/how-do-i-create-a-deb-package-for-a-single-python-script that the basic source package layout would be:
myapp-config/ -- myapp.txt.config -- debian/ -- changelog -- copyright -- compat -- rules -- control -- install ... but I'd have to run dch --create to "create a properly formatted debian/changelog entry", and debuild --no-tgz-check to build; though dch is a Perl script (devscripts/scripts/debchange.pl), and so is debuild (devscripts/scripts/debuild.pl); but I cannot tell to what extent they will work on MSYS2/MINGW64.
I thought also of creating a Makefile with a single install entry:
install: install -D -m 644 myapp.txt.config /usr/share/myapp/ ... and then calling checkinstall on it to create a deb package; checkinstall seems to be bash, but I cannot tell if it will run on MSYS2/MINGW64, as it probably needs sudo - also that github version is from 13 years ago, and it might even be that checkinstall is no longer being maintained.
So, what would be the right approach to build a .deb package in my case? If there is no way to build a .deb package on MSYS2/MINGW64, what would be the right way to organize the project, so I build this single-text-file .deb on Raspberry Pi with least amount of effort?
dpkgis available for installation (as are other package management tools) - presumably so that you can play around with other packaging formats for other systems you use. Are you sure dpkg isn't packaged in msys2?checkinstallthing worked 13 years ago it probably still works. But it's probably better to use standard tools if @muru is right.pacman -Ss dpkg, and only hit I got back was msys/pactoys, which only hasupdpkgvertool that containsdpkgin the name; so I guess MSYS2 maintainers did not copy this from ArchPKGBUILDto build it for your system -dpkgisn't very complex.