Building .deb package with Meson/Ninja
I have seen a lot of guides/How-Tos on building .deb packages using the traditional configure & make method, and those work out great.
However, I am not seeing anything on building packages based on the Meson & Ninja build setup. Not even Debian's own guide mentions anything on this. Can anyone point me to something? Thanks! |
As an example, see debian/rules for xed from Linux Mint.
OTOH, meson and ninja are listed among build systems recognized by debhelper, so I guess for most packages the standard dh magic should work, too. And if debhelper wrongly determines the used build system itself, you may always specify it explicitly: Code:
%: |
When I tried the normal build, it would report not finding classic stuff like configure.
When I tried entering "dh $@ --buildsystem=meson" it reported back, "dh: error: Unknown sequence --buildsystem=meson (options should not come before the sequence)" Thanks for responding. |
1. What's your distro?
Code:
grep ^PRETTY /etc/os-release Code:
dpkg -l debhelper Code:
dh build --no-act --buildsystem=meson |
Here are the responses.
Quote:
Quote:
Quote:
|
I don't see anything wrong with your setup.
1. What software are you trying to build? Have you tried to build it manually, according to upstream instructions (they are usually in files named INSTALL*, README* and the like)? Did it work? 2. Please show the contents of debian/rules. |
It is Budgie Desktop 10.5.
And yes, I have tried the manual build Here is the content of debian/rules Code:
#!/usr/bin/make -f |
budgie-desktop 10.5.1-3 is currently in sid. Why not just install it from the official repo?
Just to be sure, I've rebuilt budgie-desktop 10.5.1-6 currently in experimental from source. The only problem was package libmutter-6-dev still being in experimental. So I did Code:
sudo pbuilder --update --override-config --distribution experimental |
Reason for not using packages is to learn how to make various packages, and learn how to make my own repos.
I had downloaded the source packages from the upstream developer repo on Github. Maybe that is why I am having issues. I tried downloading source from the Deb source repos using "apt-get source", but I guess I have to do that as sudo user. |
No, it's not necessary to be root in order to use apt-get source. From the apt-get(1) manpage:
Quote:
Quote:
From Ubuntu's pbuilder Howto: Quote:
Quote:
|
Been a while. With so many people at the house all the time now, I get endlessly interrupted, and hard to sit down and work on this stuff.
Anyway, I was trying to get the source from apt the wrong way. Just running "apt-get source budgie-desktop" worked out fine. Got a folder labeled "budgie-desktop-10.5," archive named, "budgie-desktop_10.5.orig.tar.xz," file named "budgie-desktop_10.5.orig.tar.xz.asc," another archive named "budgie-desktop_10.5-1.debian.tar.xz," and a file named "budgie-desktop_10.5-1.dsc." At this point, I am not even sure what to do with all the different files as there seems to be no Debian documentation on what to to to get it to compile/patch/make .deb package. Overriding dh_auto_build? Changing MAKE variable? Not sure what you mean. I have not changed anything. Just trying to learn how to build this, and make a repo package. Any docs to point me to, or help on that? Thanks again! |
Code:
sudo apt install build-essential devscripts Quote:
|
[QUOTE=shruggy;6113082]
Code:
sudo apt install build-essential devscripts I will check out the links. Reason is because the simples are really not learning to build harder packages. Just do the commands and its done. Here we have something really to learn here. Thanks |
Quote:
Code:
rm -rf budgie-desktop-10.5 |
No. I removed all previous ones, then made a special directory just for this project on April 17, then did the apt source.
However, I did go ahead and did those two commands above, and reran "debuild -us -uc" and got bit of a different result, but still a failure. Quote:
|
There should be ninja build log somewhere (probably in debian/build). Try to find it:
Code:
find /home/trent/Developer/budgie/budgie-desktop-10.5/ -name .ninja_log You seem trying to build a buster package on sid. My instructions above (debuild) were for building packages for the same release you are on though. Building for other releases (and often even for the same one) is usually done via pbuilder. |
I happen to have another system up with Debian 9 which does not have any funny stuff going on.
I was able to grab source version 10.2.9 on there. Running Quote:
Code:
dh: Unknown sequence --buildsystem=meson (options should not come before the sequence) So, what is up with that? Quote:
Looks like I am going to have to put together a special system just for building packages. Next up is for me to figure out to give them custom names. Thanks a lot for this help. |
Quote:
Code:
dh build --buildsystem=meson Quote:
pbuilder links:
|
So I finally was able to get around to this.
I added in "--buildsystem=meson" to the bottom of the ../debian/rules file. Then ran the "dh build --buildsystem=meson" and it is getting errors. Code:
dh_auto_configure -O--buildsystem=meson Thanks again! |
File meson.pm is in the package debhelper:
Code:
$ apt-file search meson.pm |
Quote:
Quote:
Executing Code:
apt-file search meson.pm |
Wait, now I'm confused. In #5 you were using Debian unstable (sid). It was debhelper 12.9 back then. Now, you're showing me you're using debhelper 10.2.5, which is the version in oldstable (Stretch). As I said in #4:
Quote:
|
Thanks for clearing that up. I guess I should of review the whole thread each time I come back.
I got debhelper from stretch-backport on now. Now I am getting different errors. When running dh build --buildsystem=meson It returns: Quote:
It gives me Code:
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/budgie-desktop_10.2.9-2.diff.sAFm4E Thanks for all the help. I guess I will go research those |
Quote:
Code:
#! /usr/bin/make -f Code:
dpkg-buildpackage --no-sign |
I will certainly give that a look. I have not done anything on this since this post. I guess I need to start working on that again.
Thanks for the input |
All times are GMT -5. The time now is 05:47 PM. |