Skip to content

Commit

Permalink
Merge pull request #2972 from kfeuz/Issue114
Browse files Browse the repository at this point in the history
Create .deb binary packages with ant. Fixes issue #114
  • Loading branch information
benfry committed Nov 19, 2014
2 parents e955305 + 70ec4b1 commit 0e93895
Show file tree
Hide file tree
Showing 5 changed files with 167 additions and 3 deletions.
90 changes: 87 additions & 3 deletions build/build.xml
Expand Up @@ -725,8 +725,8 @@
<exec executable="./processing" dir="linux/work" spawn="true"/>
</target>

<target name="linux-dist" depends="linux-build"
description="Build .tar.gz of linux version">
<target name="linux-dist-tar" depends="linux-build"
description="Build .tar.gz of linux version">

<!--
<tar compression="gzip" destfile="linux/processing-${version}.tgz">
Expand Down Expand Up @@ -759,7 +759,91 @@
</echo>
</target>


<target name="linux-dist" depends="linux-dist-tar"
description="Build .deb of linux version">

<!-- start with a clean debian folder -->
<delete dir="linux/debian" quiet="true" />

<!-- setup the file structure -->
<mkdir dir="linux/debian/opt" />
<mkdir dir="linux/debian/usr/bin" />
<mkdir dir="linux/debian/usr/share/applications/" />
<mkdir dir="linux/debian/usr/share/mime/packages/" />
<!-- rename the work folder temporarily -->
<move file="linux/work" tofile="linux/debian/opt/processing" />
<symlink link="linux/debian/usr/bin/processing" resource="../../opt/processing/processing" />

<!-- place .desktop and .sharedmimeinfo file -->
<copy file="linux/processing.desktop" tofile="linux/debian/usr/share/applications/processing.desktop" >
<filterchain>
<replacetokens >
<token key="version" value="${version}" />
</replacetokens>
</filterchain >
</copy >
<copy file="linux/processing.sharedmimeinfo" tofile="linux/debian/usr/share/mime/packages/processing.xml" />

<!-- Set properties for DEBIAN/control file -->
<property name="linux.deb" value="linux/processing-${version}-linux${sun.arch.data.model}.deb" />

<condition property="deb.arch" value="i386">
<equals arg1="${sun.arch.data.model}" arg2="32" />
</condition>
<condition property="deb.arch" value="amd64">
<equals arg1="${sun.arch.data.model}" arg2="64" />
</condition>

<length property="deb.bsize" >
<fileset dir="linux/debian" />
</length>

<script language="javascript">
<![CDATA[
var length_bytes = project.getProperty("deb.bsize");
var length_kbytes = Math.ceil(length_bytes / 1024);
project.setNewProperty("deb.kbsize", length_kbytes);
]]>
</script>

<!-- place DEBIAN/control file. -->
<mkdir dir="linux/debian/DEBIAN" />
<copy file="linux/control" tofile="linux/debian/DEBIAN/control" >
<filterchain>
<replacetokens >
<token key="version" value="${version}" />
<token key="size" value="${deb.kbsize}" />
<token key="arch" value="${deb.arch}" />
</replacetokens>
</filterchain >
</copy >
<copy file="linux/copyright" tofile="linux/debian/DEBIAN/copyright" />

<!-- Create .deb file -->
<exec executable="fakeroot" dir="linux" failonerror="true">
<arg value="dpkg-deb" />
<arg value="--build" />
<arg value="debian" />
<arg value="../${linux.deb}" />
</exec>

<!-- put... the candle... back -->
<!-- (rename the debian processing version to work) -->
<move file="linux/debian/opt/processing" tofile="linux/work" />

<!-- cleanup -->
<delete dir="linux/debian" />

<echo>
=======================================================
Processing for Linux was built. Grab the deb from

${linux.deb}
=======================================================
</echo>
</target>


<!-- - - - - - - - -->
<!-- Windows -->
<!-- - - - - - - - -->
Expand Down
9 changes: 9 additions & 0 deletions build/linux/control
@@ -0,0 +1,9 @@
Package: processing
Version: @version@
Section: devel
Priority: optional
Installed-Size: @size@
Architecture: @arch@
Maintainer: Kyle Feuz <kylefeuz@weber.edu>
Description: Processing programming language and IDE
Processing is a programming language, development environment, and online community. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology. Initially created to serve as a software sketchbook and to teach computer programming fundamentals within a visual context, Processing evolved into a development tool for professionals. Today, there are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning, prototyping, and production.
53 changes: 53 additions & 0 deletions build/linux/copyright
@@ -0,0 +1,53 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Processing
Upstream-Contact: Processing Foundation <foundation@processing.org>
Ben Fry <fry@processing.org>
Casey Reas <reas@processing.org>
Source: https://github.com/processing/processing

Files: core/*
Copyright: 2001 Massachusetts Institute of Technology
2004-2014 Ben Fry and Casey Reas
License: LGPL-2.1
This program is free software; you can redistribute it
and/or modify it under the terms of the Lesser GNU General Public
License as published by the Free Software Foundation.
.
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more
details.
.
You should have received a copy of the Lesser GNU General Public
License along with this package; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
.
On Debian systems, the full text of the Lesser GNU General Public
License version 2.1 can be found in the file
`/usr/share/common-licenses/LGPL-2.1'.


Files: app/*
Copyright: 2001 Massachusetts Institute of Technology
2004-2014 Ben Fry and Casey Reas
License: GPL-2
This program 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.
.
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more
details.
.
You should have received a copy of the GNU General Public
License along with this package; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2'.
10 changes: 10 additions & 0 deletions build/linux/processing.desktop
@@ -0,0 +1,10 @@
[Desktop Entry]
Version=@version@
Name=Processing
Comment=graphics and animation language
Exec=processing %F
Icon=/opt/processing/lib/icons/pde-256.png
Terminal=false
Type=Application
Categories=AudioVideo;Video;Graphics;Developer;
StartupWMClass=Processing
8 changes: 8 additions & 0 deletions build/linux/processing.sharedmimeinfo
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="text/x-processing">
<comment>Processing source code</comment>
<sub-class-of type="text/x-csrc"/>
<glob pattern="*.pde"/>
</mime-type>
</mime-info>

0 comments on commit 0e93895

Please sign in to comment.