wok-6.x view portmidi/receipt @ rev 24396

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 08 12:15:27 2022 +0000 (2022-02-08)
parents 44d6f3a2ee81
children b0069c845544
line source
1 # SliTaz package receipt.
3 PACKAGE="portmidi"
4 VERSION="217"
5 CATEGORY="multimedia"
6 SHORT_DESC="Platform Independent Library for MIDI I/O"
7 MAINTAINER="slaxemulator@gmail.com"
8 LICENSE="MIT"
9 TARBALL="$PACKAGE-src-$VERSION.zip"
10 WEB_SITE="http://portmedia.sourceforge.net/portmidi/"
11 WGET_URL="$SF_MIRROR/portmedia/$PACKAGE/$VERSION/$TARBALL"
13 DEPENDS="alsa-lib"
14 BUILD_DEPENDS="alsa-lib-dev cmake unzip"
16 # What is the latest version available today?
17 current_version()
18 {
19 wget -O - https://sourceforge.net/projects/portmedia/files/portmidi/ 2>/dev/null | \
20 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
21 sed '/scope="row/!d;s|.*/portmidi/||;s|/.*||;q'
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 cd $src
28 patch -Np1 -i $stuff/portmidi-217-Makefile.patch
30 # Prefix Fix
31 sed -i "s_\(/usr\)/local_\1_" \
32 */CMakeLists.txt \
33 pm_python/setup.py
35 # Installation Fix
36 #mkdir -p pm_java/Release
38 # CMake configuration
39 cmake . \
40 -DCMAKE_INSTALL_PREFIX=/usr \
41 -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=Release \
42 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=Release \
43 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=Release
45 make && make DESTDIR=$DESTDIR install
46 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 genpkg_rules()
50 {
51 mkdir -p $fs/usr
52 cp -a $install/usr/* $fs/usr
53 }