summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Graef2017-01-07 10:57:28 +0100
committerAlbert Graef2017-01-07 10:57:28 +0100
commit477e0dc7b49ad8414f487c879f13aadc1fea6ed7 (patch)
treea1fe20ff5601991f38cee66752b90785ed604c48
parentafa4255217b7f608fa31c005db2077e01ec04dd3 (diff)
downloadaur-477e0dc7b49ad8414f487c879f13aadc1fea6ed7.tar.gz
Make it possible to install purr-data along with pd-l2ork.
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD102
-rw-r--r--userconfig.patch31
3 files changed, 103 insertions, 39 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cc43df7aa633..ddd0aa2dfe77 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Fri Nov 11 22:25:42 UTC 2016
+# Sat Jan 7 09:55:16 UTC 2017
pkgbase = purr-data-git
pkgdesc = Jonathan Wilkes' nw.js variant of Pd-L2Ork (git version)
- pkgver = 20161110.r3065.cdbcc2a
+ pkgver = 20170106.r3227.7ad55854
pkgrel = 1
url = https://git.purrdata.net/jwilkes/purr-data
install = purr-data.install
@@ -63,16 +63,15 @@ pkgbase = purr-data-git
depends = libxss
depends = ttf-dejavu
provides = purr-data
- provides = pd-l2ork
conflicts = purr-data
- conflicts = pd-l2ork
- conflicts = pd-l2ork-git
options = !makeflags
options = !strip
source = purr-data-git::git+https://git.purrdata.net/jwilkes/purr-data.git
source = RTcmix-pd-LCPLAY-stabilize.patch
+ source = userconfig.patch
md5sums = SKIP
md5sums = 39c53063dc18681f29b12c08d9c453aa
+ md5sums = 0707c240816e87b0f605058c2ab8e153
source_i686 = http://dl.nwjs.io/v0.18.5/nwjs-sdk-v0.18.5-linux-ia32.tar.gz
md5sums_i686 = 1d5e9e25c36b7c3221e317baa7d94b64
source_x86_64 = http://dl.nwjs.io/v0.18.5/nwjs-sdk-v0.18.5-linux-x64.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
index d039a2fbd6b0..5045423214e8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,19 +5,27 @@
# Basically, it is Pd-L2Ork with the Tk GUI replaced with a JavaScript GUI
# implemented using nw.js (http://nwjs.io/).
-# NOTE: This is experimental ALPHA software which is still heavily under
-# development, so expect some bugs. If you want a version of Pd-L2Ork ready
-# for production use, use the pd-l2ork or pd-l2ork-git package instead.
+# NOTE: This is BETA software which is still under development, so expect some
+# bugs and ongoing changes in some parts of the program and its library. If
+# you want a stable version of Pd-L2Ork ready for production use, you may want
+# to use the pd-l2ork or pd-l2ork-git package instead. That said, purr-data
+# has been coming along nicely and should be ready for daily use already. If
+# necessary, you can also install both purr-data and pd-l2ork on the same
+# system.
-# This package can be installed as a drop-in replacement for pd-l2ork, but
-# currently the two cannot be installed together. Like the pd-l2ork package,
-# this package *can* be installed along with pd or pd-extended, however. To
-# avoid conflicts with these, cyclist, pdsend and pdreceive can be found under
-# /usr/lib/pd-l2ork/bin instead. Likewise, the Gem include files get installed
-# under /usr/include/pd-l2ork.
+# This package can be installed alongside pd-l2ork, as well as vanilla pd or
+# pd-extended. To avoid conflicts with any of these, the main contents of the
+# package can be found under /opt/purr-data by default (you can change this
+# with the prefix variable below). Thus cyclist, pdsend, pdreceive and
+# purr-data's main pd-l2ork binary itself can be found under
+# /opt/purr-data/bin. The include and library files are under the same
+# prefix. Also, a symbolic link purr-data is created under /usr/bin so that
+# the program can be invoked easily from the command line. Likewise, links to
+# the include and lib directories are created under /usr/include/purr-data and
+# /usr/lib/purr-data, so that 3rd party externals know where to find these.
pkgname=purr-data-git
-pkgver=20161110.r3065.cdbcc2a
+pkgver=20170106.r3227.7ad55854
pkgrel=1
pkgdesc="Jonathan Wilkes' nw.js variant of Pd-L2Ork (git version)"
url="https://git.purrdata.net/jwilkes/purr-data"
@@ -32,14 +40,16 @@ depends=('bluez-libs' 'desktop-file-utils' 'dssi' 'fftw'
'smpeg' 'speex' 'stk' 'tk' 'tkpng' 'vlc' 'xapian-tcl-bindings' 'zlib'
'alsa-lib' 'gconf' 'gtk2' 'nss' 'libxtst' 'libxss' 'ttf-dejavu')
makedepends=('autoconf' 'automake' 'libtool' 'git' 'rsync')
-provides=('purr-data' 'pd-l2ork')
-conflicts=('purr-data' 'pd-l2ork' 'pd-l2ork-git')
+provides=('purr-data')
+conflicts=('purr-data')
install=purr-data.install
options=('!makeflags' '!strip')
source=("$pkgname::git+https://git.purrdata.net/jwilkes/purr-data.git"
- "RTcmix-pd-LCPLAY-stabilize.patch")
+ "RTcmix-pd-LCPLAY-stabilize.patch"
+ "userconfig.patch")
md5sums=('SKIP'
- '39c53063dc18681f29b12c08d9c453aa')
+ '39c53063dc18681f29b12c08d9c453aa'
+ '0707c240816e87b0f605058c2ab8e153')
# nw.js sdk binaries
nwjsname=nwjs-sdk
nwjsver=0.18.5
@@ -55,6 +65,13 @@ elif [ "$CARCH" = "x86_64" ]; then
_arch="x64"
fi
+# Installation prefix. This must be something other than /usr if you want to
+# install Purr Data alongside Pd-L2Ork. Note that some items such as desktop
+# files and icons will still be installed under /usr so that the system finds
+# them, but they will be renamed to prevent name clashes with files from the
+# pd-l2ork package.
+prefix=${prefix:-/opt/purr-data}
+
# Run 'makepkg buildopt=-b' for an incremental build (this skips recompiling
# Gem which takes a *long* time to build). Note that this will only produce a
# proper package if src still contains the results of a previous full build,
@@ -78,6 +95,8 @@ prepare() {
cp -a $srcdir/$nwjsname-v$nwjsver-linux-$_arch pd/nw/nw
# make the sources compile with gcc 6.1+
cd $srcdir/$pkgname/externals/rtcmix-in-pd && patch -Np1 < $srcdir/RTcmix-pd-LCPLAY-stabilize.patch
+ # patch the user config dir name so that purr-data can coexist with pd-l2ork
+ cd $srcdir/$pkgname && patch -Np1 < $srcdir/userconfig.patch
}
build() {
@@ -86,38 +105,53 @@ build() {
unset INCLUDES
cd $srcdir/$pkgname/l2ork_addons
- ./tar_em_up.sh $buildopt -n
+ inst_dir=$prefix ./tar_em_up.sh $buildopt -n
}
package() {
cd "$srcdir/$pkgname/packages/linux_make/build"
cp -a * "$pkgdir"
- # Remove init.d-related stuff.
- cd "$pkgdir/etc"
- rm -rf default init.d
- # Remove extra K12 icons. K12 mode is not supported by purr-data yet.
+ # Create a link to the executable.
+ mkdir -p "$pkgdir/usr/bin"
+ ln -sf $prefix/bin/pd-l2ork "$pkgdir/usr/bin/purr-data"
+ # Create links to the include and lib directories.
+ mkdir -p "$pkgdir/usr/include"
+ ln -sf $prefix/include/pd-l2ork "$pkgdir/usr/include/purr-data"
+ mkdir -p "$pkgdir/usr/lib"
+ ln -sf $prefix/lib/pd-l2ork "$pkgdir/usr/lib/purr-data"
+ # Just remove all the /etc stuff and the Emacs mode for now, we don't really
+ # need these.
+ rm -rf "$pkgdir/etc" "$pkgdir/usr/share/emacs"
+ # Edit the library paths in the default user.settings file so that it
+ # matches our install prefix.
+ cd "$pkgdir$prefix/lib/pd-l2ork"
+ sed -e "s!/usr/lib/pd-l2ork!$prefix/lib/pd-l2ork!g" -i default.settings
+ # Replace the pd-l2ork desktop/mime files and icons with purr-data ones, so
+ # that pd-l2ork can be installed alongside purr-data. We also remove the K12
+ # desktop files which aren't needed since K12 mode is not supported by
+ # purr-data (yet).
cd "$pkgdir/usr/share/applications"
- rm -f pd-l2ork-k12*.desktop
- # Move pdsend and pdreceive to avoid conflicts with other Pd versions.
- cd "$pkgdir/usr"
- mv bin/cyclist bin/pdreceive bin/pdsend lib/pd-l2ork/bin
- # Get rid of the corresponding manpages
- rm -f share/man/man1/pdreceive.* share/man/man1/pdsend.*
- # Move the Gem include files into the pd-l2ork include directory to prevent
- # conflicts with other packages providing these files.
- mv include/Gem include/pd-l2ork
- # Edit the Gem pkgconfig file accordingly and rename it.
- sed -e 's?/include?/include/pd-l2ork?g' -e 's?/lib/pd/extra?/lib/pd-l2ork/extra?g' < lib/pkgconfig/Gem.pc > lib/pkgconfig/pd-l2ork-Gem.pc && rm -f lib/pkgconfig/Gem.pc
- # The Japanese filename causes woes with pacman, remove it.
- #rm -f lib/pd-l2ork/doc/manuals/StartHere/+ここからスタート.pd
+ sed -e 's/pd-l2ork/purr-data/g' -e 's/Pd-L2Ork/Purr-Data/g' < pd-l2ork.desktop > purr-data.desktop
+ sed -e 's/pd-l2ork/purr-data/g' -e 's/Pd-L2Ork/Purr-Data/g' < pd-l2ork-debug.desktop > purr-data-debug.desktop
+ rm -f pd-l2ork*.desktop
+ cd "$pkgdir/usr/share/mime/packages"
+ sed -e 's/pd-l2ork/purr-data/g' < pd-l2ork.xml > purr-data.xml
+ rm -f pd-l2ork.xml
+ cd "$pkgdir/usr/share/icons/hicolor/128x128/apps/"
+ rm -f pd-l2ork-k12*.png
+ mv pd-l2ork.png purr-data.png
+ mv pd-l2ork-red.png purr-data-red.png
+ cd "$pkgdir/usr/share/icons/hicolor/128x128/mimetypes/"
+ mv text-x-pd-l2ork.png text-x-purr-data.png
# Remove libtool archives and extra object files.
+ cd "$pkgdir$prefix"
rm -f lib/pd-l2ork/extra/*/*.la lib/pd-l2ork/extra/*/*.pd_linux_o
# Sanitize permissions.
cd "$pkgdir"
chmod -R go-w *
chmod -R a+r *
- chmod a-x usr/lib/pd-l2ork/default.settings
- find usr/lib/pd-l2ork/bin/nw -executable -not -type d -exec chmod a+x {} +
+ chmod a-x opt/purr-data/lib/pd-l2ork/default.settings
+ find opt/purr-data/lib/pd-l2ork/bin/nw -executable -not -type d -exec chmod a+x {} +
#find . -executable -name '*.pd_linux' -exec chmod a-x {} +
find . -executable -name '*.pd' -exec chmod a-x {} +
find . -executable -name '*.txt' -exec chmod a-x {} +
diff --git a/userconfig.patch b/userconfig.patch
new file mode 100644
index 000000000000..b5ec5ff5ea6c
--- /dev/null
+++ b/userconfig.patch
@@ -0,0 +1,31 @@
+diff --git a/pd/src/s_file.c b/pd/src/s_file.c
+index 1c18096f..576e4c36 100644
+--- a/pd/src/s_file.c
++++ b/pd/src/s_file.c
+@@ -62,7 +62,7 @@ static void sys_initloadpreferences( void)
+ sys_libdir->s_name);
+
+ if (homedir)
+- snprintf(user_prefs_file, FILENAME_MAX, "%s/.pd-l2ork/user.settings", homedir);
++ snprintf(user_prefs_file, FILENAME_MAX, "%s/.purr-data/user.settings", homedir);
+ if (stat(user_prefs_file, &statbuf) == 0)
+ strncpy(filenamebuf, user_prefs_file, FILENAME_MAX);
+ else if (stat(default_prefs_file, &statbuf) == 0)
+@@ -143,7 +143,7 @@ static void sys_initsavepreferences( void)
+
+ if (!homedir)
+ return;
+- snprintf(filenamebuf, FILENAME_MAX, "%s/.pd-l2ork", homedir);
++ snprintf(filenamebuf, FILENAME_MAX, "%s/.purr-data", homedir);
+ filenamebuf[FILENAME_MAX-1] = 0;
+ if (stat(filenamebuf, &statbuf) || !S_ISDIR(statbuf.st_mode)) {
+ // user config dir doesn't exist yet, try to create it
+@@ -152,7 +152,7 @@ static void sys_initsavepreferences( void)
+ return;
+ }
+ }
+- snprintf(filenamebuf, FILENAME_MAX, "%s/.pd-l2ork/user.settings", homedir);
++ snprintf(filenamebuf, FILENAME_MAX, "%s/.purr-data/user.settings", homedir);
+ filenamebuf[FILENAME_MAX-1] = 0;
+ if ((sys_prefsavefp = fopen(filenamebuf, "w")) == NULL)
+ {