[arch-commits] Commit in solfege/trunk (PKGBUILD)
David Runge
dvzrv at archlinux.org
Sat Aug 31 22:20:32 UTC 2019
Date: Saturday, August 31, 2019 @ 22:20:32
Author: dvzrv
Revision: 505760
upgpkg: solfege 3.23.4-1
Upgrading to 3.23.4. Switching to gtk3 and python-gobject as depends. Fixing problems with python include locations and removing bizarre use of git to define unused data. Stripping pkgdir from embedded paths by recompiling the python files in place in package().
Modified:
solfege/trunk/PKGBUILD
----------+
PKGBUILD | 57 +++++++++++++++++++++++++--------------------------------
1 file changed, 25 insertions(+), 32 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-08-31 21:28:37 UTC (rev 505759)
+++ PKGBUILD 2019-08-31 22:20:32 UTC (rev 505760)
@@ -4,42 +4,38 @@
# Contributor: sickhate <sickhate at tux-linux.net>
pkgname=solfege
-pkgver=3.22.2
-pkgrel=5
+pkgver=3.23.4
+pkgrel=1
pkgdesc="Music education and ear training software"
arch=('x86_64')
url="https://www.gnu.org/software/solfege/"
license=('GPL3')
groups=('pro-audio')
-depends=('pygtk' 'librsvg')
-makedepends=('ghostscript' 'gnome-doc-utils' 'libxslt'
- 'swig' 'texinfo' 'txt2man')
-optdepends=('timidity++: or any MIDI player & MIDI-WAV converter'
- 'mpg123: or any MP3 player'
- 'lame: or any WAV-MP3 converter'
- 'vorbis-tools: or any OGG player & WAV-OGG converter'
- 'lilypond: for generating print-outs & score sheets'
- 'texlive-bin: use LaTeX to replace HTML reports with DVI')
-source=("https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz"{,.sig})
-sha512sums=('475d2eea54d0c6b2cb11a5271a02ca64e79c45fb6155d87a01b16e826669a07cca0b4c2543cbbb1ce8d36412ccfd64e8052de1efad3db19f34d7e0a984d7459a'
- 'SKIP')
-validpgpkeys=('D1820E3CCB05255CCD9855988143F7EEA5E43EA3')
+depends=('gtk3' 'python-gobject')
+makedepends=('ghostscript' 'gnome-doc-utils' 'libxslt' 'lilypond' 'swig'
+'texinfo' 'txt2man')
+optdepends=('csound: Generate example sounds'
+ 'timidity++: MIDI playback'
+ 'mpg123: Mp3 playback'
+ 'vorbis-tools: Ogg playback'
+ 'lilypond: Generate print-outs and score sheets'
+ 'texlive-bin: Generate reports')
+source=("https://git.savannah.gnu.org/cgit/solfege.git/snapshot/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('f2ef7bdb3d1eb15842d803d4d093a177096b6960b211cd3607101f2c03c29fcd3f5151d3b02be4a04236305d18658ba6fa3b5a771b04be4a65f646e27b31914b')
prepare() {
cd "${pkgname}-${pkgver}"
- # python2 fix for entire build
- export PYTHON=/usr/bin/python2
-
- # python2 fix for rogue Makefile
- sed -i 's/shell python/shell python2/g' help/Makefile
-
- # fix static python shebang
- sed -i 's/python/python2/g' "${pkgname}/_version.py"
+ # setup version file, so we don't have to use bizarre scripts using git
+ echo "version_info ={'git_sha': None}" > "${pkgname}/_version.py"
+ # replace wrong cflags assumptions
+ sed -E 's|(PYTHON_INCLUDES=).+|\1"$(pkg-config --cflags-only-I python3)"|g' \
+ -i acinclude.m4
+ aclocal $ACINCLUDE
+ autoconf
}
build() {
cd "${pkgname}-${pkgver}"
-
./configure --prefix=/usr \
--sysconfdir=/etc
make
@@ -47,14 +43,11 @@
package() {
cd "${pkgname}-${pkgver}"
-
- # python2 fix for runtime
- for i in $(find "$pkgdir" -name '*.py'); do
- sed -i 's:^#!.*bin/python$:#!/usr/bin/python2:' "$i"
- sed -i 's:^#!.*bin/env python$:#!/usr/bin/env python2:' "$i"
- done
-
make DESTDIR="$pkgdir" install
+ # strip $pkgdir from embedded paths:
+ python -m compileall -d "/usr/share/${pkgname}/${pkgname}" \
+ "${pkgdir}/usr/share/${pkgname}/${pkgname}"
+ python -O -m compileall -d "/usr/share/${pkgname}/${pkgname}" \
+ "${pkgdir}/usr/share/${pkgname}/${pkgname}"
}
-
# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list