summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Arndt2018-03-14 18:20:19 +0100
committerChristopher Arndt2018-03-14 18:20:19 +0100
commit1b43df3b6b43c73e3a174ead7afbf76ded55aacd (patch)
treebedd0b44d67b926ab2b9e10e437c7884acb6becf
parentabfa92db2b68ea2f21191d9785ad4670d16eb530 (diff)
downloadaur-1b43df3b6b43c73e3a174ead7afbf76ded55aacd.tar.gz
Install docs; various cleanups to make package ready for 1.0
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD71
-rw-r--r--fix_dtd_version.patch22
-rw-r--r--fix_missing_locale.patch10
4 files changed, 91 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b8c615c455b..b596b3846fe 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,6 @@
-# Generated by mksrcinfo v8
-# Wed Aug 23 09:19:09 UTC 2017
pkgbase = hydrogen-git
- pkgdesc = An advanced drum machine - git version
- pkgver = 0.9.7.r2953.9c99b935
+ pkgdesc = An advanced drum machine (git version)
+ pkgver = 1.0.0.beta1.r3003.36fc60c7
pkgrel = 1
url = https://github.com/hydrogen-music/hydrogen
arch = i686
@@ -10,17 +8,26 @@ pkgbase = hydrogen-git
license = GPL
makedepends = git
makedepends = cmake
+ makedepends = docbook-xml
+ makedepends = docbook-sgml
+ makedepends = docbook-utils
+ makedepends = docbook-xsl
+ makedepends = poxml
+ makedepends = xmlto
depends = libarchive
depends = liblrdf
depends = qt5-xmlpatterns
depends = libpulse
depends = lash
depends = liblo
- optdepends = rubberband: Audio Time Stretcher Library
provides = hydrogen
conflicts = hydrogen
source = hydrogen::git://github.com/hydrogen-music/hydrogen.git
+ source = fix_dtd_version.patch
+ source = fix_missing_locale.patch
md5sums = SKIP
+ md5sums = 67122f71e3be7546d0b483f6fc923b19
+ md5sums = 90ca9817a9976c483fbe0e9605d73058
pkgname = hydrogen-git
diff --git a/PKGBUILD b/PKGBUILD
index f07700f5000..b51f1a99c76 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,28 @@
# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>
# Contributor: hbdee <hbdee.arch@gmail.com>
-pkgname=hydrogen-git
_pkgname=hydrogen
-pkgver=0.9.7.r2953.9c99b935
+pkgname="${_pkgname}-git"
+pkgver=1.0.0.beta1.r3003.36fc60c7
pkgrel=1
-pkgdesc="An advanced drum machine - git version"
+pkgdesc="An advanced drum machine (git version)"
arch=('i686' 'x86_64')
license=('GPL')
url="https://github.com/hydrogen-music/hydrogen"
depends=('libarchive' 'liblrdf' 'qt5-xmlpatterns' 'libpulse' 'lash' 'liblo')
-optdepends=('rubberband: Audio Time Stretcher Library')
-makedepends=('git' 'cmake')
-source=("$_pkgname"::'git://github.com/hydrogen-music/hydrogen.git')
-provides=('hydrogen')
-conflicts=('hydrogen')
-md5sums=('SKIP')
+makedepends=('git' 'cmake' 'docbook-xml' 'docbook-sgml' 'docbook-utils' 'docbook-xsl' 'poxml' 'xmlto')
+source=("${_pkgname}"::'git://github.com/hydrogen-music/hydrogen.git'
+ 'fix_dtd_version.patch'
+ 'fix_missing_locale.patch')
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+md5sums=('SKIP'
+ '67122f71e3be7546d0b483f6fc923b19'
+ '90ca9817a9976c483fbe0e9605d73058')
pkgver() {
- cd "$srcdir/$_pkgname"
+ cd "${srcdir}/${_pkgname}"
+
local version="$(git describe --tags | sed -e 's/-[^-]*-[^-]*$//;s/-/./g')"
local revision=$(git rev-list --count HEAD)
local hash=$(git rev-parse --short HEAD)
@@ -26,7 +30,7 @@ pkgver() {
}
prepare() {
- cd "$srcdir/$_pkgname"
+ cd "${srcdir}/${_pkgname}"
if [[ -d build ]]; then
rm -rf build
@@ -34,34 +38,53 @@ prepare() {
mkdir build
- # fix some pngs that break with newer libpng
- # see https://mailman.archlinux.org/pipermail/arch-dev-public/2013-May/024872.html
- #msg2 "Fixing PNGs, please wait..."
- #find -name '*.png' -exec optipng -quiet -force -fix {} +
+ # get docs sources
+ git submodule update --init
+
+ # various fixes
+ patch -Np1 -i "${srcdir}/fix_dtd_version.patch" || true
+ patch -Np1 -i "${srcdir}/fix_missing_locale.patch" || true
+
+ # fix python2 shebang
+ sed -e 's/python/python2/' -i data/i18n/stats.py
+ # Fix none FHS-compliant installation paths
+ sed -i \
+ -e 's|/usr/share/pixmaps|${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps|' \
+ -e 's|/man/man1|/share/man/man1|' \
+ CMakeLists.txt
}
build() {
- cd "$srcdir/$_pkgname"
+ cd "${srcdir}/${_pkgname}/build"
- cmake ../$_pkgname \
+ cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DWANT_DEBUG=OFF \
-DWANT_LASH=ON \
-DWANT_LRDF=ON \
+ -DWANT_DEBUG=OFF \
-DWANT_CPPUNIT=OFF
make
+ # build html manual & tutorial
+ cd "$srcdir/$_pkgname/data/doc"
+ make
+ # update translations
+ cd "$srcdir/$_pkgname/data/i18n"
+ ./updateTranslations.sh
}
package() {
- cd "$srcdir/$_pkgname"
+ cd "${srcdir}/${_pkgname}/build"
make DESTDIR="${pkgdir}" install
- # Fix none FHS-compliant installation paths
- rm -rf "${pkgdir}/usr/share/man"
- mv "${pkgdir}/usr/man" "${pkgdir}/usr/share/man"
- # Remove empty dir
- rmdir "${pkgdir}/usr/share/hydrogen/data/doc"
+ # docs
+ install -t "${pkgdir}/usr/share/doc/${pkgname}" \
+ -vDm644 ../{ChangeLog,DEVELOPERS,INSTALL.txt,README.txt}
+
+ # clean up data dir
+ # https://github.com/hydrogen-music/hydrogen/issues/559
+ rm -v "${pkgdir}/usr/share/${_pkgname}/data/i18n/"{*.ts,stats.py,updateTranslations.sh} \
+ "${pkgdir}/usr/share/${_pkgname}/data/doc/"{*.docbook,*.po,*.pot,Makefile,TODO}
}
# vim:set ts=2 sw=2 et:
diff --git a/fix_dtd_version.patch b/fix_dtd_version.patch
new file mode 100644
index 00000000000..01da7a1ed5a
--- /dev/null
+++ b/fix_dtd_version.patch
@@ -0,0 +1,22 @@
+--- a/data/doc/manual.docbook 2016-11-05 09:22:50.000000000 +0100
++++ b/data/doc/manual.docbook 2017-07-28 18:03:51.938394459 +0200
+@@ -1,6 +1,6 @@
+ <?xml version="1.0" encoding="UTF-8"?> <!-- -*- mode:nxml; indent-tabs-mode:nil; fill-column:80; -*- -->
+- <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.0//EN"
+- "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
++ <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.2//EN"
++ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ <book id="Hydrogen-manual" lang="en">
+
+ <bookinfo>
+--- a/data/doc/tutorial.docbook 2016-11-05 09:22:50.000000000 +0100
++++ b/data/doc/tutorial.docbook 2017-07-28 18:03:51.938394459 +0200
+@@ -1,6 +1,6 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.0//EN"
+- "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
++<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.2//EN"
++ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ <book id="Hydrogen-tutorial" lang="en">
+
+ <bookinfo>
diff --git a/fix_missing_locale.patch b/fix_missing_locale.patch
new file mode 100644
index 00000000000..75845b28869
--- /dev/null
+++ b/fix_missing_locale.patch
@@ -0,0 +1,10 @@
+--- a/data/i18n/updateTranslations.sh 2016-11-05 09:22:50.000000000 +0100
++++ b/data/i18n/updateTranslations.sh 2017-07-28 12:25:19.230534851 +0200
+@@ -35,6 +35,7 @@
+ $CMD ../../data/i18n/hydrogen.de.ts
+ $CMD ../../data/i18n/hydrogen.sv.ts
+ $CMD ../../data/i18n/hydrogen.hr.ts
++$CMD ../../data/i18n/hydrogen.ca.ts
+ $CMD ../../data/i18n/hydrogen.cs.ts
+ $CMD ../../data/i18n/hydrogen.el.ts
+ $CMD ../../data/i18n/hydrogen.gl.ts