Commit 515d4684 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

Merge pull request #8 from agraef/master

Debian packaging for Launchpad
parents 0c5703e9 bf12749a
# The Pd-L2Ork version number used in this build. XXXFIXME: Is there a way to
# grab this from the source somewhere?
version = 0.42.6
# Make Debian packages. This builds a package from the current HEAD in a
# subdirectory named $(debdist). It also creates the source archive that goes
# along with it. All files will be created in the toplevel source directory.
# To make this work, you need to have the Debian package toolchain (debuild
# and friends) installed. Also make sure you have your DEBEMAIL and
# DEBFULLNAME environment variables set up as explained in the debchange(1)
# manual page. These are needed to create changelog entries and in order to
# sign the Debian packages created with 'make deb' and 'make debsrc'.
# The typical workflow is as follows:
# 1. Run 'make debchange' once to create a new debian/changelog entry. You
# *must* do this once so that debuild knows about the proper version number of
# the package.
# 2. Run 'make deb' to build a signed binary package. Or 'make deb-us' for an
# unsigned one.
# If you only need the binary package for local deployment then you're done.
# Otherwise proceed to step 3.
# 3. Run 'make debsrc' to create a signed Debian source package which can be
# uploaded, e.g, to Launchpad using 'dput'. Or 'make debsrc-us' for an
# unsigned package.
# 4. Run 'make debclean' to get rid of any files that were created in steps 2
# and 3.
# The Debian version gets derived from the package version $(version) as well
# as the date and serial number of the last commit.
debversion = $(version)+git$(shell git log -1 --format=%cd --date=short | sed -e 's/-//g')+$(shell git rev-list --count HEAD)
# Debian revision number of the package.
debrevision = 1
# Source tarball and folder.
debsrc = pd-l2ork_$(debversion).orig.tar.gz
debdist = pd-l2ork-$(debversion)
# Secondary sources (Gem, wiringPi).
gemdebsrc = pd-l2ork_$(debversion).orig-Gem.tar.gz
pidebsrc = pd-l2ork_$(debversion).orig-wiringPi.tar.gz
# This is used for automatically generated debian/changelog entries (cf. 'make
# debchange'). Adjust as needed.
debmsg = "Build from latest upstream source."
debprio = "low"
.PHONY: debversion debchange debclean deb debsrc deb-us debsrc-us
@echo $(debversion)
dch -u $(debprio) -v $(debversion)-$(debrevision) $(debmsg) && dch -r ""
rm -rf $(debdist)
rm -f pd-l2ork_$(version)+git* pd-l2ork-*.tar.bz2
deb: $(debsrc) $(gemdebsrc) $(pidebsrc)
# Unpack the primary source into our temporary build directory.
rm -rf $(debdist)
tar xfz $(debsrc)
# This works around some problems compiling externals on Precise and earlier
# (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
# Unpack the secondary sources.
cd $(debdist) && rm -Rf Gem && tar xfz ../$(gemdebsrc)
cd $(debdist) && rm -Rf wiringPi && tar xfz ../$(pidebsrc)
# 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)
# Get rid of the temporary build directory.
rm -rf $(debdist)
$(MAKE) deb DEBUILD_FLAGS="-us -uc"
$(MAKE) deb DEBUILD_FLAGS="-S -us -uc"
git -C .. archive --format=tar.gz -o $(CURDIR)/$(debsrc) --prefix=$(debdist)/ HEAD
$(gemdebsrc): ../Gem/ChangeLog
# Make sure that the Gem submodule is updated.
git -C .. submodule update
git -C ../Gem archive --format=tar.gz -o $(CURDIR)/$(gemdebsrc) --prefix=Gem/ HEAD
# Make sure that the Gem submodule is initialized.
git -C .. submodule init
$(pidebsrc): wiringPi/INSTALL
git -C wiringPi pull
git -C wiringPi archive --format=tar.gz -o $(CURDIR)/$(pidebsrc) --prefix=wiringPi/ HEAD
git clone git://
pd-l2ork (0.42.6+git20141114+1491-1) trusty; urgency=low
* Build from latest upstream source.
-- Albert Graef <> Sat, 15 Nov 2014 12:03:02 +0100
pd-l2ork (0.42.6+git20141114+1487-1) trusty; urgency=low
* Build from latest upstream source.
-- Albert Graef <> Fri, 14 Nov 2014 01:51:22 +0100
pd-l2ork (0.42.6+git20141112+1479-1) trusty; urgency=low
* Build from latest upstream source.
-- Albert Graef <> Wed, 12 Nov 2014 19:06:22 +0100
Source: pd-l2ork
Section: sound
Priority: extra
Maintainer: Albert Graef <>
Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, pkg-config, bison, flex, tcl-dev, tk-dev, libgtk2.0-dev, python-dev, python-support, flite1-dev, ladspa-sdk, libasound2-dev, libjack-dev, libbluetooth-dev, libcairo2-dev, libglew-dev, libgsl0-dev, libmagick++-dev, libavifile-0.7-dev, libdc1394-22-dev, libfftw3-dev, libfluidsynth-dev, libftgl-dev, libgmerlin-dev, libgsm1-dev, libjpeg-dev, libmp3lame-dev, libmpeg3-dev, libquicktime-dev, libraw1394-dev, libsmpeg-dev, libsndobj-dev, libspeex-dev, libstk0-dev, libv4l-dev, libvorbis-dev, libxv-dev, rsync, curl
Standards-Version: 3.9.5
Package: pd-l2ork
Architecture: any
# XXXTODO: Not sure whether it's really necessary to explicitly list these,
# since most of the corresponding development packages are already in the build
# dependencies. However, some of these might be loaded dynamically rather than
# being linked at compile time, so for safety we just include them all.
Depends: ${shlibs:Depends}, ${misc:Depends}, python, tkpng, tclxapian, ttf-dejavu-core, libavifile-0.7c2, libbluetooth3, libdc1394-22, libfftw3-3, libflite1, libftgl2, libgmerlin0, libgmerlin-avdec1, libgsl0ldbl, libgsm1, libjpeg62, libmp3lame0, libmpeg3-1, libquicktime2, libraw1394-11, libsmpeg0, libspeex1, libv4l-0, libvorbis0a, libxv1
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
Pd-L2Ork is Linux Laptop Orchestra's (L2Ork) real-time visual
programming environment for interactive multimedia. It also offers
a unique K-12 educational module for teaching children basics
about interactive instrument design, digital signal processing,
and music.
Pd-L2Ork is used as the backbone of L2Ork's infrastructure. It
has been also used in a number of MAKEr workshops, including
work with like Raspberry Pi and Arduino.
Pd-L2Ork is a monolithic fork of Pure Data.
Upstream-Name: pd-l2ork
Files: *
Copyright: 1996-2012 Miller Puckette and others
License: BSD
Files: debian/*
Copyright: 2012 Albert Graef <>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <>
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
scripts/bash_completion/pd-l2ork etc/bash_completion.d
l2ork_addons/K12 usr/lib/pd-l2ork/extra
packages/linux_make/default.settings usr/lib/pd-l2ork
packages/linux_make/pd-l2ork.gif usr/lib/pd-l2ork
packages/linux_make/pd-l2ork*.png usr/share/icons/hicolor/128x128/apps
packages/linux_make/text-x-puredata.png usr/share/icons/hicolor/128x128/mimetypes
packages/linux_make/pd-l2ork*.desktop usr/share/applications
?package(pd-l2ork):needs="x11" section="Applications/Sound"\
title="Pd-L2Ork" \
command="/usr/bin/pd-l2ork" \
text/x-puredata; pd-l2ork '%s'; edit=pd-l2ork '%s'; test=test "$DISPLAY" != ""; priority=2
text/x-maxmsp; pd-l2ork '%s'; edit=pd-l2ork '%s'; test=test "$DISPLAY" != ""; priority=2
# postrm script for pure
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see or
# the debian-policy package
case "$1" in
if [ remove = "$1" -o abort-install = "$1" -o disappear = "$1" ]; then
for x in cyclist pdsend pdreceive; do
dpkg-divert --package pd-l2ork --remove --rename --divert /usr/bin/$x.orig /usr/bin/$x
for x in pdsend pdreceive; do
dpkg-divert --package pd-l2ork --remove --rename --divert /usr/share/man/man1/$x.1.orig.gz /usr/share/man/man1/$x.1.gz
echo "postrm called with unknown argument \`$1'" >&2
exit 1
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0
# preinst script for pure
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see or
# the debian-policy package
# Move files out of the way which are also in the vanilla Pd package.
case "$1" in
for x in cyclist pdsend pdreceive; do
dpkg-divert --package pd-l2ork --add --rename --divert /usr/bin/$x.orig /usr/bin/$x
for x in pdsend pdreceive; do
dpkg-divert --package pd-l2ork --add --rename --divert /usr/share/man/man1/$x.1.orig.gz /usr/share/man/man1/$x.1.gz
echo "preinst called with unknown argument \`$1'" >&2
exit 1
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
dh $@
cd wiringPi/wiringPi && make static
cd l2ork_addons/raspberry_pi/disis_gpio && ln -sf $(CURDIR)/wiringPi .
cd l2ork_addons && inst_dir=/usr ./ -F -n
mkdir -p debian/pd-l2ork && mv packages/linux_make/build/usr debian/pd-l2ork
# Default preferences file.
install -d debian/pd-l2ork/etc/pd-l2ork && ln -s -f /usr/lib/pd-l2ork/default.settings debian/pd-l2ork/etc/pd-l2ork/default.settings
# Get rid of the Gem development files (these are provided elsewhere) and
# other stuff that's neither needed nor wanted.
cd debian/pd-l2ork/ && rm -f Makefile README.txt
cd debian/pd-l2ork/usr && rm -rf include/Gem lib/pkgconfig lib/pd-l2ork/extra/*/*.pd_linux_o lib/pd-l2ork/extra/*/*.la
# XXXTODO: Do we want to move these over to the doc hierarchy??
# rm -f debian/pd-l2ork/usr/lib/pd-l2ork/extra/*-help.pd
# XXXTODO: This is deprecated, so we might have to migrate to dh_python2 in
# the future. See
dh_pysupport -n
dh_compress -X.pd -X.wav -X.aiff -X.txt
chmod 0755 debian/pd-l2ork/usr/lib/pd-l2ork/bin/
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="">
<mime-type type="text/x-puredata">
<sub-class-of type="text/plain"/>
<glob pattern="*.pd"/>
<alias type="application/x-puredata"/>
<magic priority="50">
<match type="string" value="#N " offset="0"/>
<comment>Pure Data Document</comment>
<comment xml:lang="en">Pure Data Document</comment>
<comment xml:lang="de">Pure Data Dokument</comment>
<comment xml:lang="cy">Dogfen Pure Data</comment>
<comment xml:lang="nb">Pure Data-dokument</comment>
<comment xml:lang="nn">Pure Data-dokument</comment>
<comment xml:lang="fi">Pure Data-asiakirja</comment>
<comment xml:lang="cz">Pure Data Dokument</comment>
<comment xml:lang="sl">Dokument Pure Data</comment>
<comment xml:lang="fr">Pure Data Document</comment>
<comment xml:lang="es">Documento de Pure Data</comment>
<comment xml:lang="it">Documento Pure Data</comment>
<comment xml:lang="nb">Pure Data dokument</comment>
<comment xml:lang="da">Pure Data Dokument</comment>
<comment xml:lang="tr">Pure Data Belgesi</comment>
<comment xml:lang="ru">Документ Pure Data</comment>
<mime-type type="text/x-puredata-help">
<sub-class-of type="text/x-puredata"/>
<glob pattern="*-help.pd"/>
<comment>Pure Data Help</comment>
<mime-type type="text/x-puredata-meta">
<sub-class-of type="text/x-puredata"/>
<glob pattern="*-meta.pd"/>
<comment>Pure Data Meta Marker for Libraries</comment>
<mime-type type="application/x-puredata-external-linux">
<sub-class-of type="application/octet-stream"/>
<glob pattern="*.pd_linux"/>
<comment>Pure Data External (Linux Binary)</comment>
<mime-type type="application/x-puredata-external-darwin">
<sub-class-of type="application/octet-stream"/>
<glob pattern="*.pd_darwin"/>
<comment>Pure Data External (Mac OS X Binary)</comment>
<mime-type type="text/x-maxmsp">
<sub-class-of type="text/plain"/>
<glob pattern="*.mxt"/>
<comment>Max/MSP Text Document</comment>
<magic priority="50">
<match type="string" value="max v2;" offset="0"/>
<mime-type type="application/x-maxmsp">
<sub-class-of type="application/octet-stream"/>
<glob pattern="*.mxb"/>
<magic priority="50">
<match type="string" value="pmax" offset="4"/>
<comment>Max/MSP Binary Document</comment>
Fix up LDFLAGS for Precise and earlier (patch by Hans-Christoph Steiner,
updated to pd-l2ork by Albert Graef).
Description: fix ./configure dying thinking we're cross-compiling
When building using debuild on Debian/squeeze or Ubuntu < quantal,
./configure somehow gets some LDFLAGS for shared libraries and uses them in
the gcc tests. The executable then fails to run since its a shared library,
and ./configure thinks we're cross-compiling. This patch forces no LDFLAGS.
diff --git a/externals/Makefile b/externals/Makefile
index 7b64f45..6b7c49b 100644
--- a/externals/Makefile
+++ b/externals/Makefile
@@ -611,6 +611,7 @@ $(gem_src)/Gem.pd_linux: $(gem_src)/configure
test -s $(gem_src)/Gem.pd_linux || \
cd $(gem_src) && ./configure \
--prefix=$(prefix) \
--with-video=plugins \
--with-film=plugins \
@@ -649,7 +650,7 @@ $(externals_src)/gem2pdp/configure: $(externals_src)/gem2pdp/
cd $(externals_src)/gem2pdp && aclocal && autoconf
$(externals_src)/gem2pdp/Makefile: $(externals_src)/gem2pdp/
- cd $(externals_src)/gem2pdp && ./configure --with-pddir=$(pd_src) \
+ cd $(externals_src)/gem2pdp && ./configure LDFLAGS= --with-pddir=$(pd_src) \
--with-gemdir=$(gem_src) --with-pdpdir=$(externals_src)/pdp
gem2pdp: $(externals_src)/gem2pdp/configure $(externals_src)/gem2pdp/Makefile
@@ -885,7 +886,7 @@ $(IEM16_DIR)/configure: $(IEM16_DIR)/ $(IEM16_DIR)/aclocal.m4
$(IEM16_DIR)/Make.config: $(IEM16_DIR)/ \
- cd $(IEM16_DIR) && ./configure --disable-library \
+ cd $(IEM16_DIR) && ./configure LDFLAGS= --disable-library \
iem16: $(IEM16_DIR)/Make.config
@@ -1269,11 +1270,11 @@ $(externals_src)/OSCx/configure: $(externals_src)/OSCx/
cd $(externals_src)/OSCx && autoconf
$(externals_src)/OSCx/Makefile: $(externals_src)/OSCx/
- cd $(externals_src)/OSCx && ./configure
+ cd $(externals_src)/OSCx && ./configure LDFLAGS=
$(externals_src)/OSCx/libOSC/Makefile: $(externals_src)/OSCx/libOSC/
- cd $(externals_src)/OSCx && ./configure
+ cd $(externals_src)/OSCx && ./configure LDFLAGS=
$(externals_src)/OSCx/src/Makefile: $(externals_src)/OSCx/src/
- cd $(externals_src)/OSCx && ./configure
+ cd $(externals_src)/OSCx && ./configure LDFLAGS=
$(externals_src)/OSCx/src/OSCroute.$(EXTENSION): $(externals_src)/OSCx/configure \
@@ -1356,7 +1357,7 @@ $(externals_src)/pdp/configure: $(externals_src)/pdp/
cd $(externals_src)/pdp && autoconf
$(externals_src)/pdp/Makefile.config: $(externals_src)/pdp/configure $(externals_src)/pdp/
- cd $(externals_src)/pdp && ./configure PD_CPPFLAGS="-I$(pd_src)/src" \
+ cd $(externals_src)/pdp && ./configure LDFLAGS= PD_CPPFLAGS="-I$(pd_src)/src" \
$(externals_src)/pdp/pdp.$(EXTENSION): $(externals_src)/pdp/Makefile.config
@@ -1770,6 +1771,7 @@ $(zexy_src)/configure: $(zexy_src)/
$(zexy_src)/Makefile: $(zexy_src)/configure $(zexy_src)/ $(zexy_src)/src/
cd $(zexy_src) && ./configure --disable-library \
--with-extension=$(EXTENSION) \
--prefix=$(prefix) \
--libdir=$(objectsdir) \
diff --git a/externals/iem16/src/Makefile b/externals/iem16/src/Makefile
index 25e5bbe..5be876d 100644
--- a/externals/iem16/src/Makefile
+++ b/externals/iem16/src/Makefile
@@ -22,7 +22,7 @@ aclocal.m4: acinclude.m4
Make.config: configure
- ./configure $(CONFIGUREFLAGS)
-include $(SOURCES:.c=.d)
diff --git a/externals/moocow/extended/Makefile b/externals/moocow/extended/Makefile
index 2726d1a..9da4944 100644
--- a/externals/moocow/extended/Makefile
+++ b/externals/moocow/extended/Makefile
@@ -36,7 +36,7 @@ MOOCOW_BUILD_VERSION ?=2009-04-27.002
# CFLAGS="$(shell echo $(CFLAGS))" ##-- works
CFLAGS="$(CFLAGS) -I/sw/include" \
- LDFLAGS="$(LDFLAGS) -L$(pd_src)/src -L$(pd_src)/bin -L$(pd_src)/obj -L/sw/lib" \
+ LDFLAGS="-L$(pd_src)/src -L$(pd_src)/bin -L$(pd_src)/obj -L/sw/lib" \
--with-pd-include="$(pd_src)/src" \
--with-pd-dir="$(MOOCOW_BUILD)" \
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment