Skip to content
Snippets Groups Projects
Commit 14165661 authored by Albert Gräf's avatar Albert Gräf
Browse files

debuild: Make it possible to install purr-data along with pd-l2ork.

parent 7ad55854
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,8 @@ deb: $(debsrc) $(addprefix debian/nwjs/, $(nwjs))
# (patch from pd-extended by Hans-Christoph Steiner, modified for pd-l2ork).
# This can be removed once Ubuntu 12.04 finally goes the way of the dodo.
# cd $(debdist) && patch -p1 < ../precise-configure.patch
# Patch the user config dir name so that purr-data can coexist with pd-l2ork.
cd $(debdist) && patch -Np1 < ../userconfig.patch
# Make sure to copy the Debian files which may have uncommitted changes.
# Then run debuild to create the package.
cd $(debdist) && cp -R ../debian . && debuild $(DEBUILD_FLAGS)
......
......@@ -10,8 +10,6 @@ Package: purr-data
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, python, python-tk, tkpng, tclxapian, fluid-soundfont-gm
Recommends: xdg-utils, pulseaudio-utils, tap-plugins, ladspa-foo-plugins, invada-studio-plugins-ladspa, blepvco, swh-plugins, mcp-plugins, cmt, blop, omins, ubuntustudio-audio-plugins, rev-plugins, dssi-utils, vco-plugins, wah-plugins, fil-plugins, mda-lv2
Provides: pd-l2ork
Replaces: pd-l2ork
Description: Interactive multimedia programming environment (NW.js variant)
This is Jonathan Wilkes' nw.js variant of Pd-L2Ork, nick-named
"Purr-Data". Basically, it is Pd-L2Ork with the Tk GUI replaced
......
......@@ -13,6 +13,13 @@ else
arch = ia32
endif
# 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 = /opt/purr-data
%:
dh $@
......@@ -21,28 +28,28 @@ override_dh_auto_configure:
override_dh_auto_build:
# Copy the nw.js sources to where purr-data wants them.
tar -xf debian/nwjs/$(nwjspkg)-$(arch).tar.gz && rm -rf pd/nw/nw && mv $(nwjspkg)-$(arch) pd/nw/nw
cd l2ork_addons && ./tar_em_up.sh -B -n
cd l2ork_addons && (export inst_dir=$(prefix); ./tar_em_up.sh -B -n)
override_dh_auto_install:
mkdir -p debian/purr-data && mv packages/linux_make/build/* debian/purr-data
# Create a link to the executable.
mkdir -p debian/purr-data/usr/bin && ln -sf $(prefix)/bin/pd-l2ork debian/purr-data/usr/bin/purr-data
# Create links to the include and lib directories.
mkdir -p debian/purr-data/usr/include && ln -sf $(prefix)/include/pd-l2ork debian/purr-data/usr/include/purr-data
mkdir -p debian/purr-data/usr/lib && ln -sf $(prefix)/lib/pd-l2ork debian/purr-data/usr/lib/purr-data
# Remove some unneeded files.
cd debian/purr-data/ && rm -f Makefile README.txt
# cd debian/purr-data/usr/lib/pd-l2ork/bin && rm -f DejaVuSansMono.ttf
cd debian/purr-data/usr/share/applications && rm -f pd-l2ork-k12*.desktop
cd debian/purr-data/usr/lib/pd-l2ork/extra && rm -rf */*.pd_linux_o */*.la
# Move cyclist and pdsend/pdreceive to the pd-l2ork lib directory to prevent
# conflicts with other packages providing these files.
cd debian/purr-data/usr/bin && mv pdsend pdreceive cyclist ../lib/pd-l2ork/bin
# Also remove the corresponding man pages.
cd debian/purr-data/usr/share/man/man1 && rm -rf pdsend.* pdreceive.*
# Move the Gem include files into the pd-l2ork include directory to prevent
# conflicts with other packages providing these files.
cd debian/purr-data/usr && mv include/Gem include/pd-l2ork
# Edit the Gem pkgconfig file accordingly and rename it.
cd debian/purr-data/usr/lib/pkgconfig && sed -e 's?/include?/include/pd-l2ork?g' -e 's?/lib/pd/extra?/lib/pd-l2ork/extra?g' < Gem.pc > pd-l2ork-Gem.pc && rm -f Gem.pc
cd debian/purr-data/ && rm -rf Makefile README.txt etc usr/share/emacs
cd debian/purr-data$(prefix)/lib/pd-l2ork/extra && rm -rf */*.pd_linux_o */*.la
# Edit the library paths in the default user.settings file.
cd debian/purr-data$(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.
cd debian/purr-data/usr/share/applications && (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 debian/purr-data/usr/share/mime/packages && (sed -e 's/pd-l2ork/purr-data/g' < pd-l2ork.xml > purr-data.xml) && rm -f pd-l2ork.xml
cd debian/purr-data/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 debian/purr-data/usr/share/icons/hicolor/128x128/mimetypes/ && mv text-x-pd-l2ork.png text-x-purr-data.png
# Sanitize permissions.
cd debian/purr-data && chmod -R go-w * && chmod -R a+r * && chmod a-x usr/lib/pd-l2ork/default.settings
find debian/purr-data/usr/lib/pd-l2ork/bin/nw -executable -not -type d | xargs chmod a+x
cd debian/purr-data && chmod -R go-w * && chmod -R a+r * && chmod a-x .$(prefix)/lib/pd-l2ork/default.settings
find debian/purr-data$(prefix)/lib/pd-l2ork/bin/nw -executable -not -type d | xargs chmod a+x
find debian/purr-data -executable -name '*.pd_linux' | xargs chmod a-x
find debian/purr-data -executable -name '*.pd' | xargs chmod a-x
find debian/purr-data -executable -name '*.txt' | xargs chmod a-x
......
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)
{
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment