You are not logged in.

#1 2021-12-21 17:32:24

nameiwillforget
Member
Registered: 2019-08-10
Posts: 27

[Solved] Can someone help me with the PKGBUILD I'm trying to adapt?

I'd like to make a pkgbuild for the offshoot of the OpenMusic composition software OM# https://github.com/cac-t-u-s/om-sharp. I thought this should be relatively easy, since OpenMusic is already in the AUR and the makefiles are very similar, so I took the OM pkgbuild:

# Maintainer: Daniel Appelt <daniel.appelt@gmail.com>
_pkgbasename=openmusic
pkgname=${_pkgbasename}-bin
pkgver=6.19
pkgrel=1
pkgdesc="A visual programming language designed for music composition"
arch=("x86_64")
url="http://repmus.ircam.fr/openmusic/"
license=("GPL")
depends=("desktop-file-utils" "gdk-pixbuf2" "portmidi" "libsndfile")
optdepends=("jack: JACK audio support"
	    "libsamplerate: speed up audio-waveform drawing")
makedepends=("rsync")
provides=("${_pkgbasename}")
conflicts=("${_pkgbasename}")
# Note that the openmusic executable may not be compressed/stripped.
# (http://www.lispworks.com/kb/a15fc2ea99b4f8f5802571fe0057705a.html)
options=(!strip)
install="${_pkgbasename}.install"
source=("https://github.com/openmusic-project/OM6/releases/download/v${pkgver}/OM_${pkgver}.tar.bz2")
sha256sums=("d6e2d806d375281ed12bf94294735355ec360368ff5b101ba466695691735526")

package() {
	cd "$srcdir/OM_${pkgver}"
	make DESTDIR="${pkgdir}" PREFIX=/usr install
}

and modify it:

# Maintainer: Alexander Praehauser <a.prae@protonmail.com>
_pkgbasename=omsharp
pkgname=${_pkgbasename}-bin
pkgver=1.5
pkgrel=1
pkgdesc="Offshoot and inofficial successor to the OpenMusic composition software>
arch=("x86_64")
url="https://cac-t-u-s.github.io/"
license=("GPL")
depends=("desktop-file-utils" "gdk-pixbuf2" "portmidi" "libsndfile")
optdepends=("jack: JACK audio support"
            "libsamplerate: speed up audio-waveform drawing")
makedepends=("rsync")
provides=("${_pkgbasename}")
conflicts=("${_pkgbasename}")
# Note that the openmusic executable may not be compressed/stripped.
# (http://www.lispworks.com/kb/a15fc2ea99b4f8f5802571fe0057705a.html)
options=(!strip)
install="${_pkgbasename}.install"
source=("https://github.com/cac-t-u-s/om-sharp/archive/refs/tags/v${pkgver}.tar>

package() {
        cd "$srcdir/OM_${pkgver}"
        make DESTDIR="${pkgdir}" PREFIX=/usr install
}

But I couldn't find the sha-checksum on the github website, so I deleted it to try it out. But when I execute makepkg, it complains that the install file does not exist. What should I do about these two things? Is there anything else to consider when adapting the pkgbuild? Also, since the github project doesn't have a release page, I used the download link that was on the main page. Is that ok?

Last edited by nameiwillforget (2021-12-22 08:11:38)

Offline

#2 2021-12-21 18:01:38

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [Solved] Can someone help me with the PKGBUILD I'm trying to adapt?

The install file is the file specified by the "install" field. They are sometimes provided alongside the PKGBUILD and not downloaded from upstream. Check what it is and what it does in the openmusic package. If you need the same functionality, you will need to include it in your omsharp package after making any necessary adaptations.

You can update the checksums in the PKGBUILD by running "updpkgsums", but you should verify the package yourself in that case before distributing the PKGBUILD. The ideal verification is by comparing the checksum to ones provided by upstream, but when those are not available, the only thing that you can do is check that the sources appear to be correct and that they build as expected.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2021-12-21 18:25:10

loqs
Member
Registered: 2014-03-06
Posts: 17,328

Re: [Solved] Can someone help me with the PKGBUILD I'm trying to adapt?

pkgname=${_pkgbasename}-bin

Why give the package a -bin suffix when you are building it from source?

license=("GPL")

https://github.com/cac-t-u-s/om-sharp/b … er/LICENSE
See PKGBUILD#license

source=("https://github.com/cac-t-u-s/om-sharp/archive/refs/tags/v${pkgver}.tar>

Please consider renaming the downloaded archive to have a more unique name such as $pkgname-$pkgver.tar
Also the line has been truncated.

The install file of openmusic.install duplicates the functionality desktop-file-utils provides in the hook /usr/share/libalpm/hooks/update-desktop-database.hook.

	cd "$srcdir/OM_${pkgver}"
	make DESTDIR="${pkgdir}" PREFIX=/usr install

/startdir/PKGBUILD: line 22: cd: /build/omsharp-bin/src/OM_1.5: No such file or directory

Also no makefile in tarball.

Offline

#4 2021-12-21 19:37:55

nameiwillforget
Member
Registered: 2019-08-10
Posts: 27

Re: [Solved] Can someone help me with the PKGBUILD I'm trying to adapt?

Alright, I have imported a checksum, corrected the GPL version, removed the bin suffix and looked at the openmusic.install file. It doesn't seem to do much though:

post_install() {
  update-desktop-database -q
}

post_upgrade() {
  post_install
}

post_remove() {
  post_install
}

I've copied and renamed that file and tried makepkg again, with a modified path in the pkgbuild

package() {
        cd "$srcdir/om-sharp-${pkgver}"
        make DESTDIR="${pkgdir}" PREFIX=/usr
}

(I'll rename the archive once the rest works). But now I get the error

make: *** No rule to make target '/home/alex/aur/om-sharp', needed by 'install'.  Stop.

and if I remove install, I get an error saying there is no makefile in the directory. The makefile is in the build/linux subdirectory, as is the case in the normal openmusic building process. I tried copypasting it into the main directory, whereupon the next error is

/home/alex/bin/lw -build /home/alex/aur/build/deliver.lisp
make: /home/alex/bin/lw: No such file or directory

I tried building openmusic itself again from the AUR tarball, which worked as it should, with almost the same pkgbuild and the same install file. Here is what is happening for OM and should be happening for OM# at the same step:

==> Starting package()...
mkdir -p /home/alex/Downloads/openmusic-bin/pkg/openmusic-bin/usr/share/openmusic
cd /home/alex/Downloads/openmusic-bin/src/OM_6.19 && rsync -v -rlt -O -z --exclude OM_6.19 --exclude 'Makefile*'  . /home/alex/Downloads/openmusic-bin/pkg/openmusic-bin/usr/share/openmusic
sending incremental file list

and then it goes through the files. Why is it happening in one case but not in the other?

Last edited by nameiwillforget (2021-12-21 19:39:06)

Offline

#5 2021-12-21 19:42:52

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,914

Re: [Solved] Can someone help me with the PKGBUILD I'm trying to adapt?

loqs wrote:

The install file of openmusic.install duplicates the functionality desktop-file-utils provides in the hook /usr/share/libalpm/hooks/update-desktop-database.hook.

nameiwillforget, no need to include the .install file anymore, it's functionality is provided in another way.

Last edited by Lone_Wolf (2021-12-21 19:43:24)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2021-12-21 20:10:01

loqs
Member
Registered: 2014-03-06
Posts: 17,328

Re: [Solved] Can someone help me with the PKGBUILD I'm trying to adapt?

https://github.com/openmusic-project/op … 20.tar.bz2 contains prebuilt binaries.  It provides a Makefile to install them

https://github.com/cac-t-u-s/om-sharp/a … 1.5.tar.gz contains source files.  It does not provide a Makefile.
If you want to use prebuilt binaries you would need to use one of
https://github.com/cac-t-u-s/om-sharp/r … -1.5-1.deb
https://github.com/cac-t-u-s/om-sharp/r … x86_64.rpm
and move the files to the correct locations as the project does not provides a tar.bz2 containing prebuilt binaries.

Offline

#7 2021-12-21 20:58:34

nameiwillforget
Member
Registered: 2019-08-10
Posts: 27

Re: [Solved] Can someone help me with the PKGBUILD I'm trying to adapt?

nameiwillforget, no need to include the .install file anymore, it's functionality is provided in another way.

Alright, no .install file.

https://github.com/cac-t-u-s/om-sharp/a … 1.5.tar.gz contains source files.  It does not provide a Makefile.
If you want to use prebuilt binaries...

But there is a makefile. It is under build/linux. What is that doing there then? Anyway, I don't cling to prebuilt binaries, but I've never compiled a Lisp program. What do I need to do?

Offline

#8 2021-12-21 21:50:27

loqs
Member
Registered: 2014-03-06
Posts: 17,328

Re: [Solved] Can someone help me with the PKGBUILD I'm trying to adapt?

nameiwillforget wrote:

But there is a makefile. It is under build/linux.

https://github.com/cac-t-u-s/om-sharp/b … x/Makefile

nameiwillforget wrote:

What is that doing there then? Anyway, I don't cling to prebuilt binaries, but I've never compiled a Lisp program. What do I need to do?

No idea.  Seems you would need lw.  Probably supplied by http://www.lispworks.com/

Using the .deb you could try something like the following

...
_pkgbasename=om-sharp
...
source=("https://github.com/cac-t-u-s/om-sharp/releases/download/v$pkgver/$_pkgbasename-$pkgver-1.deb")
sha256sums=('49de7fec06b8f3d44f0abff0275fea8c6906b6fa3f97d84eb01eb52414686165')

package() {
bsdtar --no-same-owner -s/lib64/lib/ -xvf data.tar.xz -C "$pkgdir"
}

Offline

#9 2021-12-21 22:42:43

nameiwillforget
Member
Registered: 2019-08-10
Posts: 27

Re: [Solved] Can someone help me with the PKGBUILD I'm trying to adapt?

It worked! Thanks so much! And from all I can tell, the checksum does correspond to the package, though I guess that should have been checked already by the Debian developers. Anyway, I guess now I should submit this thing to the AUR. Is there anything else I should do beforehand? Also, is it possible to be notified by git every time a new version is released, so I don't have to check manually?

Offline

#10 2021-12-21 23:27:55

loqs
Member
Registered: 2014-03-06
Posts: 17,328

Re: [Solved] Can someone help me with the PKGBUILD I'm trying to adapt?

nameiwillforget wrote:

And from all I can tell, the checksum does correspond to the package, though I guess that should have been checked already by the Debian developers.

PKGBUILD#Integrity  As there is no checksum listed on the download package all it guarantees is that the checksum you verified matches the one I generated.
This is not connected to Debian.  To verify the origin would require the file be signed and the author's key could be used to verify the signature.

nameiwillforget wrote:

Also, is it possible to be notified by git every time a new version is released, so I don't have to check manually?

  I think it is possible using github's watch feature.

Offline

Board footer

Powered by FluxBB