Index: applications/editors/josm/debian/changelog
===================================================================
--- applications/editors/josm/debian/changelog	(revision 4308)
+++ applications/editors/josm/debian/changelog	(revision 4308)
@@ -0,0 +1,5 @@
+openstreetmap-josm (3144307) unstable; urgency=low
+
+  * Initial Version
+  
+ -- Joerg Ostertag (Debian Packages) <debian@ostertag.name>  Fri, 1 Jan 2007 07:05:36 +0100
Index: applications/editors/josm/debian/compat
===================================================================
--- applications/editors/josm/debian/compat	(revision 4308)
+++ applications/editors/josm/debian/compat	(revision 4308)
@@ -0,0 +1,1 @@
+4
Index: applications/editors/josm/debian/control
===================================================================
--- applications/editors/josm/debian/control	(revision 4308)
+++ applications/editors/josm/debian/control	(revision 4308)
@@ -0,0 +1,22 @@
+Source: openstreetmap-josm
+Section: utils
+Priority: optional
+Maintainer: Joerg Ostertag <debian@ostertag.name>
+Build-Depends: debhelper (>> 3.7.2), pkg-config
+Build-Depends-Indep: sun-java6-jdk, ant
+# java2-compiler  | sun-java5-jdk | sun-java6-jdk
+# jikes, java-gcj-compat-dev
+Standards-Version: 3.6.1
+
+Package: openstreetmap-josm
+Architecture: all
+Depends:  gij (>> 4.2) | j2re1.5 | gcj4.2 | sun-java5-re | sun-java6-re | sun-java5-jdk | sun-java6-jdk
+Depends:  openstreetmap-map-icons
+Recommends: gpsdrive, mapnik
+Recommends: openstreetmap-utils
+Recommends: openstreetmap-map-icons-restricted
+Recommends: openstreetmap-mapnik-data
+Suggests:
+Description: OpenStreetmap Editor Josm
+ This Package the Openstreetmap Editor Josm
+ for working with OpenStreetMap Data
Index: applications/editors/josm/debian/copyright
===================================================================
--- applications/editors/josm/debian/copyright	(revision 4308)
+++ applications/editors/josm/debian/copyright	(revision 4308)
@@ -0,0 +1,11 @@
+This package was debianized by Jörg Ostertag <debian@ostertag.name> on
+Wed 25 Jul 18:35:19 CEST 2007.
+
+Homepage: http://www.openstreetmap.org/, http://www.ostertag.name/
+Project Page: http://www.openstreetmap.org/
+
+Upstream Author: OpenStreetMap Contributors
+
+Copyright:
+
+openstreetmap-josm are released under the upstream licence of the maps
Index: applications/editors/josm/debian/dirs
===================================================================
--- applications/editors/josm/debian/dirs	(revision 4308)
+++ applications/editors/josm/debian/dirs	(revision 4308)
@@ -0,0 +1,1 @@
+usr/bin
Index: applications/editors/josm/debian/files
===================================================================
--- applications/editors/josm/debian/files	(revision 4308)
+++ applications/editors/josm/debian/files	(revision 4308)
@@ -0,0 +1,1 @@
+openstreetmap-josm_3144307_all.deb utils optional
Index: applications/editors/josm/debian/make_install_files.sh
===================================================================
--- applications/editors/josm/debian/make_install_files.sh	(revision 4308)
+++ applications/editors/josm/debian/make_install_files.sh	(revision 4308)
@@ -0,0 +1,148 @@
+#!/bin/sh
+
+dst_path=$1
+
+if [ ! -n "$dst_path" ] ; then
+    echo "Please specify a Directory to use as Basedirectory"
+    echo "Usage:"
+    echo "     $0 <working-dir>"
+    exit -1 
+fi
+
+echo "copying Files to '$dst_path'"
+package_name=openstreetmap-josm
+dst_path=${dst_path%/}
+
+jar_path="$dst_path/usr/local/share/josm"
+mkdir -p "$jar_path"
+
+bin_path="$dst_path/usr/bin"
+mkdir -p "$bin_path"
+
+#plugin_dir="$dst_path/usr/local/share/josm/plugins"
+plugin_dir="$dst_path/usr/lib/josm/plugins"
+mkdir -p "$plugin_dir"
+
+mkdir -p "$dst_path/usr/share/josm" 
+( # map-icons to be symlinked
+    cd  "$dst_path/usr/share/josm" 
+    ln -s ../map-icons/classic.small images
+)
+mkdir -p "$dst_path/usr/lib/josm"
+# ------------------------------------------------------------------
+# Compile the Jar Files 
+echo "Compile Josm"
+cd core
+ant compile || exit -1
+cd ..
+
+echo "Compile Josm Plugins"
+cd plugins
+ant build || exit -1
+cd ..
+
+
+# ------------------------------------------------------------------
+# Copy Jar Files
+
+cp ./core/dist/josm-custom.jar $jar_path/josm.jar || exit -1
+
+plugin_jars=`find plugins -name "*.jar"`
+for src_fn in $plugin_jars ; do 
+    fn="`basename ${src_fn}`"
+    dst_fn="$plugin_dir/$fn"
+    echo "cp $src_fn $dst_fn"
+    cp "$src_fn" "$dst_fn" || exit -1
+    plugin_name=${fn%.jar}
+    echo $plugin_name | grep -q -e plastic_laf -e lang && continue
+    plugins="$plugins$plugin_name,"
+done || exit -1
+
+# remove last empty plugin definition ,
+plugins=${plugins%,}
+
+echo "Activated Plugins:"
+echo "$plugins"
+
+mkdir -p "$jar_path/speller"
+cp ../utils/planet.osm/java/speller/words.cfg "$jar_path/speller/"
+
+# Maybe this has to be removed, since it is inside the plugin?
+cp plugins/mappaint/styles/osmfeatures/elemstyles.xml "$jar_path/elemstyles.xml"
+mkdir -p "$jar_path/plugins/mappaint/standard"
+cp plugins/mappaint/styles/osmfeatures/elemstyles.xml "$jar_path/plugins/mappaint/standard/elemstyles.xml"
+# ------------------------------------------------------------------
+cat > "$bin_path/josm" <<EOF
+#!/bin/sh
+josm_dir="/usr/local/share/josm"
+josm_bin="\$josm_dir/josm.jar"
+
+test -d ~/.josm/plugins/ || mkdir -p ~/.josm/plugins/
+#for dir in mappaint osmarender validator tways-0.1; do
+for dir in ${plugins//,/ } ; do
+    test -d ~/.josm/plugins/\$dir || mkdir -p ~/.josm/plugins/\$dir
+done
+test -d ~/.josm/plugins/mappaint/standard || mkdir -p ~/.josm/plugins/mappaint/standard
+
+if ! [ -s ~/.josm/preferences ]; then
+     echo "Installing Preferences File"
+     cp "\$josm_dir/preferences"  ~/.josm/preferences
+fi
+
+if ! [ -s ~/.josm/bookmarks ]; then
+     echo "Installing Bookmarks File"
+     cp "\$josm_dir/bookmarks"  ~/.josm/bookmarks
+fi
+
+if ! [ -s ~/.josm/plugins/mappaint/standard/elemstyles.xml ]; then
+#     echo "Installing Elemstyles File"
+#     cp "\$josm_dir/elemstyles.xml"  ~/.josm/plugins/mappaint/standard/elemstyles.xml
+      true
+fi
+
+# ls -l "\$josm_bin"
+# unzip -p    \$josm_bin REVISION | grep "Last Changed"
+
+# proxy=" -Dhttp.proxyHost=gw-squid -Dhttp.proxyPort=8888 "
+
+java -Djosm.resource=/usr/share/map-icons/square.small \
+     -Xmx500m \
+     \$proxy \
+     -jar "\$josm_bin"\
+     "\$@"
+
+EOF
+
+
+cat > "$jar_path/preferences" <<EOF
+download.gps=false
+download.newlayer=false
+download.osm=true
+download.tab=1
+lakewalker.python=/usr/bin/python
+layerlist.visible=true
+osm-server.url=http://www.openstreetmap.org/api
+plugins=$plugins
+projection=org.openstreetmap.josm.data.projection.Epsg4326
+propertiesdialog.visible=true
+propertiesdialog.visible=true
+propertiesdialog.visible=true
+toolbar=download;upload;|;new;open;save;exportgpx;|;undo;redo;|;preference
+validator.SpellCheck.checkKeys=true
+validator.SpellCheck.checkKeysBeforeUpload=true
+validator.SpellCheck.checkValues=true
+validator.SpellCheck.checkValuesBeforeUpload=true
+validator.SpellCheck.sources=/usr/local/share/josm/speller/words.cfg
+ywms.firefox=firefox
+ywms.port=8000
+EOF
+
+cat > "$jar_path/bookmarks" <<EOF
+Muenchen+,47.983424415942416,11.402620097655612,48.36334800308583,12.002250823113542
+Muenchen-,48.05109190794662,11.447878885677385,48.246831966462025,11.703938333879364
+Kirchheim,48.14904045814527,11.728348604380155,48.18983784113904,11.79273346326812
+Muc_Altstadtring,48.125724515280666,11.553433712891074,48.15107325612488,11.596158188775085
+Mainz,49.58,8.14,49.6,8.16
+Erlangen,49.53530551899356,10.893663089997254,49.64013443292672,11.07554098888691
+Ingolstadt,48.615608086215175,11.232933428311759,48.893652866507985,11.728832483590338
+EOF
Index: applications/editors/josm/debian/pth
===================================================================
--- applications/editors/josm/debian/pth	(revision 4308)
+++ applications/editors/josm/debian/pth	(revision 4308)
@@ -0,0 +1,1 @@
+openstreetmap-josm
Index: applications/editors/josm/debian/rules
===================================================================
--- applications/editors/josm/debian/rules	(revision 4308)
+++ applications/editors/josm/debian/rules	(revision 4308)
@@ -0,0 +1,75 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# This is the debhelper compatability version to use.
+#export DH_COMPAT=5
+export destdir = $(CURDIR)/debian/openstreetmap-josm
+
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+
+	# Add here commands to compile the package.
+	# $(MAKE)
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) distclean
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	./debian/update_svn_revision.sh
+	./debian/make_install_files.sh ${destdir} || exit -1
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdebconf
+#	dh_installdocs
+#	dh_installexamples
+	dh_installmenu
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_python
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+#	dh_installman
+#	dh_link
+	dh_strip
+	dh_compress 
+	dh_fixperms
+#	dh_perl
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-dependent files here.
+binary-arch: build install
+# We have nothing to do by default.
+
+binary: binary-arch binary-indep
+.PHONY: build clean binary-indep binary-arch binary install  install-indep install-arch
Index: applications/editors/josm/debian/substvars
===================================================================
--- applications/editors/josm/debian/substvars	(revision 4308)
+++ applications/editors/josm/debian/substvars	(revision 4308)
@@ -0,0 +1,1 @@
+misc:Depends=debconf (>= 0.5) | debconf-2.0
Index: applications/editors/josm/debian/update_svn_revision.sh
===================================================================
--- applications/editors/josm/debian/update_svn_revision.sh	(revision 4308)
+++ applications/editors/josm/debian/update_svn_revision.sh	(revision 4308)
@@ -0,0 +1,10 @@
+svncorerevision=`svnversion core`
+svncorerevision=${svncorerevision/M/}
+svnpluginsrevision=`svnversion plugins`
+svnpluginsrevision=${svnpluginsrevision/M/}
+svnrevision="$svncorerevision$svnpluginsrevision"
+
+if [ -n "$svnrevision" ] ; then
+    perl -p -i -e "s/\(\S+\)/\(${svnrevision}\)/;" debian/changelog
+fi
+
