TheWiseNoob / OMP

OMP is an open-source music player being developed for Linux. OMP is programmed in C++ using gtkmm, GStreamer, TagLib, clastfm, and g++.
https://openmusicplayer.com
Other
100 stars 3 forks source link

PKGBUILD for Arch Linux #1

Closed mmetak closed 6 years ago

mmetak commented 6 years ago

Change whatever to suit your needs. ;-)

pkgname=openmusicplayer-git
_pkgname=OpenMusicPlayer
pkgver=0.0.1.r0.gbc57e41
pkgrel=1
pkgdesc='gtk3 music player'
url='https://openmusicplayer.com/'
arch=(x86_64)
license=(GPL3)
depends=(gstreamer gtkmm3 libclastfm libconfig taglib)
makedepends=(boost git)
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
source=('git+https://github.com/TheWiseNoob/OpenMusicPlayer.git'
        'omp.desktop')
sha256sums=('SKIP'
            '65398127a90eec9cb79eb11a227305ec2b9f2f3ba1265e2dd1d31934205cd38c')

pkgver() {
  cd "${_pkgname}"
  git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}

build() {
  cd "${_pkgname}"
  make
}

package() {
  cd "${_pkgname}"
  install -Dm0755 omp "${pkgdir}/usr/bin/omp"
  install -Dm0644 Images/Icon_Small.png "${pkgdir}/usr/share/pixmaps/omp.png"
  install -Dm0644 ../omp.desktop "${pkgdir}/usr/share/applications/omp.desktop"
}
[Desktop Entry]
Comment=
Exec=omp %U
GenericName=Audio Player
Icon=/usr/share/pixmaps/omp.png
MimeType=application/ogg;audio/x-vorbis+ogg;application/x-ogg;audio/mp3;audio/x-mp3;audio/x-flac;audio/mpeg;audio/x-mpeg;audio;audio/mpeg3;audio/ogg;audio/flac;audio/wav;audio/x-oggflac;audio/x-tta
Name=Open Music Player
StartupNotify=false
StartupWMClass=Open Music Player
Terminal=false
TerminalOptions=
Type=Application
Categories=AudioVideo;Player;Audio;
TheWiseNoob commented 6 years ago

Thank you!

FabioLolix commented 6 years ago

I've seen the pkgbuild on the AUR and a couple of thing must be corrected


Other aesthetic only things

provides=('omp') conflicts=('omp')

and

source=("$pkgname::git+https://github.com/TheWiseNoob/OpenMusicPlayer.git"

to get rid of $_pkgname

TheWiseNoob commented 6 years ago

Thanks! I made those changes, but I can't get installation to finish because it won't overwrite omp on the filesystem after the first installation. What do I need to do to make it overwrite the omp binary after an update? I added omp to conflicts and provides.

FabioLolix commented 6 years ago

Remove first the old package or use

sudo pacman -U --force omp-git*.pkg.tar.xz

to force the installation

TheWiseNoob commented 6 years ago

Now the conflicts and provides are correct, I shouldn't have to manually remove them. Right?

TheWiseNoob commented 6 years ago

The new PKGBUILD on AUR causes this:

"==> ERROR: Integrity checks (sha256) differ in size from the source array. :: failed to verify omp-git integrity"

Any idea what I'm doing wrongly?

FabioLolix commented 6 years ago

Is the old package that don't have the right one I guess,

I don't have this problem since I have corrected them before my first build

I have re-installed right now with yaourt -S omp-git and it's gone ok

One minute to check last error

FabioLolix commented 6 years ago

You have deleted the omp.desktop file, from the source array

TheWiseNoob commented 6 years ago

Oh, you're right. Really appreciate the help. This is the first time I've even touched a PKGBUILD.

TheWiseNoob commented 6 years ago

Now I'm doing something else wrongly.

"ERROR: pkgver is not allowed to be empty. ERROR: pkgver() generated an invalid version: "

FabioLolix commented 6 years ago

replace cd "$_pkgname" with cd "$pkgname"

(if still complain set pkgver=1 then it will replaced by pkgver())

TheWiseNoob commented 6 years ago

You're the best, FabioLolix. I think I finally solved all of the problems.

FabioLolix commented 6 years ago

I'm glad to help @TheWiseNoob