debian/0000755000000000000000000000000012265367477007211 5ustar debian/control0000644000000000000000000000163612201512237010572 0ustar Source: twms Section: science Priority: extra Maintainer: Andrew Shadura Build-Depends: debhelper (>= 9), python-all (>= 2.6.6-3) Standards-Version: 3.9.4 Vcs-Hg: http://anonscm.debian.org/hg/collab-maint/twms/ Vcs-Browser: http://anonscm.debian.org/hg/collab-maint/twms/ Homepage: http://code.google.com/p/twms/ Package: twms Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python-imaging (>= 1.1.6), python-webpy (>= 1:0.33), adduser Recommends: python-pyproj (>= 1.8.6), python-cairo Provides: python-twms Description: tiny web map service twms is a WMS/TMS server for exporting your map tiles to WMS-enabled applications. . twms can export a set of raster tiles as a WMS service so GIS applications that support WMS protocol can access this tile set. Also, twms can act as a proxy and perform WMS requests to external services and serve the tile cache to WMS and TMS clients. debian/watch0000644000000000000000000000046412201512237010216 0ustar # See uscan(1) for format # Compulsory line, this is a version 3 file version=3 opts=downloadurlmangle=s#.*(twms-(.+)\.tar\.bz2).*#http://twms.googlecode.com/files/$1#,filenamemangle=s#.*(twms-(.+)\.tar\.bz2).*#$1# \ http://code.google.com/p/twms/downloads/list ^.*detail\?name=twms-(.+)\.tar\.bz2.* debian/dirs0000644000000000000000000000010012201512237010034 0ustar usr/bin var/cache/twms/tiles var/cache/twms/traces var/log/twms debian/postrm0000644000000000000000000000022712201512237010431 0ustar #!/bin/sh # postrm script for twms set -e if [ "$1" = "purge" ]; then rm -rf /var/log/twms /var/run/twms.pid /var/cache/twms fi #DEBHELPER# exit 0 debian/changelog0000644000000000000000000000521312265366515011054 0ustar twms (0.05t-2) unstable; urgency=low * Add OpenRC support. * Remove RUN parameter support from /etc/default/twms. -- Andrew Shadura Wed, 15 Jan 2014 03:07:07 +0100 twms (0.05t-1) unstable; urgency=low * New upstream release. * Use dh_python2 instead of dh_pysupport. * Bump compat level to 9. * Update Standards-Version to 3.9.4. * Update init script and the manpage. -- Andrew Shadura Sat, 10 Aug 2013 20:51:29 +0200 twms (0.04r-3) unstable; urgency=low * Upload to unstable. * Install manpages into a proper place. -- Andrew Shadura Sat, 10 Aug 2013 16:49:40 +0200 twms (0.04r-2) experimental; urgency=low * Apply upstream patch to handle bz2-compressed GPX tracks. * Recommend python-cairo. -- Andrew Shadura Mon, 08 Apr 2013 10:21:52 +0200 twms (0.04r-1) experimental; urgency=low * New upstream release. * Drop patches applied upstream. * Update copyright file: upstream is now WTFPL. * Upstream now has a Makefile, simplify rules. * Update dependencies: - Remove python-psyco. - Move python-pyproj to Recommends. * Update Vcs-* fields. -- Andrew Shadura Tue, 19 Mar 2013 16:06:07 +0100 twms (0.03e-2) unstable; urgency=low * Fix incorrect error handing that resulted in internal server errors. * Accept WMS query parameters in mixed case (fixes interoperability problems with JOSM). * Don't forcibly chown cache directory in postinst. * Fix FTBFS with funny umask set (Closes: #674817). * During package build, fix file permissions inside the build directory, not on the source files. * Bump Standards-Version to 3.9.3, no changes. -- Andrew O. Shadura Mon, 28 May 2012 19:18:25 +0200 twms (0.03e-1) unstable; urgency=low * New upstream version released. * Update the description. * Bump Standards-Version. * Depend on adduser as we use it to add a system user to run the daemon as. * Update the spelling of the maintainer's last name. * Update the dependency on webpy. * Check the default Python version when installing (patch by Jakub Wilk). * Suggest python-psyco instead of recommending it (see #614619). * Provide python-twms package. * Make it possible to configure port number. * Update the manual page. * Fix the configuration file example so the URLs have the correct port number. * Rewrite the init script. -- Andrew O. Shadura Tue, 06 Dec 2011 11:30:32 +0100 twms (0.02w-1) unstable; urgency=low * Initial release (Closes: #587522) -- Andrew O. Shadura Fri, 13 Aug 2010 17:37:27 +0300 debian/README.Debian0000644000000000000000000000052212201512237011221 0ustar twms for Debian --------------- In Debian packaging of tWMS, the tile cache and gpx cache have been moved to new locations, /var/cache/twms/tiles and /var/cache/twms/traces, accordingly. Also, "broken tiles" are now under /usr/share/twms. Tools are there too. -- Andrew O. Shadura Mon, 01 Mar 2010 00:07:23 +0200 debian/source/0000755000000000000000000000000012201512237010461 5ustar debian/source/format0000644000000000000000000000001412201512237011667 0ustar 3.0 (quilt) debian/init0000644000000000000000000000532412265367463010076 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: twms # Required-Start: $network $local_fs $remote_fs # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: twms server # Description: twms web map service ### END INIT INFO # Author: Andrew Shadura # Do NOT "set -e" # Read configuration variable file if it is present [ -r /etc/default/twms ] && . /etc/default/twms command=/usr/bin/python command_args="/usr/bin/twms ${PORT:-8080}" command_background=yes pidfile=/run/twms.pid name="twms server" description="twms web map service" user=twms:twms start_stop_daemon_args="-c $user" if [ ! -d /run/openrc ] then # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin procname=twms # Exit if the package is not installed [ -x "$command" ] || exit 0 # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.2-14) to ensure that this file is present # and status_of_proc is working. . /lib/lsb/init-functions # Function that starts the daemon/service # start() { # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started start-stop-daemon --start --quiet --pidfile $pidfile \ -b -m $start_stop_daemon_args \ --exec $command --test -- $command_args > /dev/null \ || return 1 start-stop-daemon --start --quiet --pidfile $pidfile \ -b -m $start_stop_daemon_args \ --exec $command -- $command_args > /dev/null \ || return 2 } case "$1" in start) [ "${RUN:-yes}" = yes ] || log_warning_msg "RUN variable in /etc/default/twms ignored, use update-rc.d ${0##*/} disable instead" log_daemon_msg "Starting $name" "$procname" start log_end_msg $? ;; stop) log_daemon_msg "Stopping $name" "$procname" killproc -p $pidfile $command log_end_msg $? rm -f $pidfile ;; status) status_of_proc -p $pidfile $command $procname && exit 0 || exit $? ;; restart|force-reload) log_daemon_msg "Restarting $name" "$procname" $0 stop sleep 1 $0 start ;; *) echo "Usage: ${0##*/} {start|stop|status|restart|force-reload}" >&2 exit 3 ;; esac else if [ -z "$RC_SERVICE" ] then /sbin/openrc-run "$0" "$@" else "$@" fi fi : debian/copyright0000644000000000000000000000161112201512237011113 0ustar This package was debianized by: Andrew Shadura on Mon, 01 Mar 2010 00:07:23 +0200 It was downloaded from: Upstream Author: Darafei Praliaskouski Copyright: Copyright © 2009—2013 Darafei Praliaskoiski © 2010—2013 Andrew Shadura License: WTFPL Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO. The Debian packaging is: Copyright © 2010—2013 Andrew Shadura and is licensed under the same license as the upstream package. debian/patches/0000755000000000000000000000000012201516271010612 5ustar debian/patches/manpage.patch0000644000000000000000000000223112201513103013230 0ustar From: Andrew Shadura Subject: Update the manpage. --- a/twms.1 +++ b/twms.1 @@ -16,7 +16,7 @@ .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME -twms \- tiny WMS server +twms \- WMS (web map service) / TMS (tiled map service) server .SH SYNOPSIS .B twms .I [PORT] @@ -29,7 +29,7 @@ .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. -\fBtwms\fP is a tiny WMS server capable of serving tiled images or proxying another WMS services +\fBtwms\fP is a WMS/TMS server capable of serving tiled images or proxying another WMS services .SH OPTIONS The only optional parameter \fBtwms\fR accepts is the port number on which it listens. Apart from that, it is fully configurable through its configuration file located at @@ -38,5 +38,5 @@ .SH AUTHOR twms was written by Darafei Praliaskouski . .PP -This manual page was written by Andrew Shadura , +This manual page was written by Andrew Shadura , for the Debian project (and may be used by others). debian/patches/series0000644000000000000000000000010012201514705012016 0ustar 03_remove_path.patch manpage.patch symlink-rel-to-destdir.patch debian/patches/symlink-rel-to-destdir.patch0000644000000000000000000000173312201516271016161 0ustar From: Andrew Shadura Subject: Links should be relative to DESTDIR. --- a/Makefile.mk +++ b/Makefile.mk @@ -21,7 +21,7 @@ INSTALL_PROGRAM = $(INSTALL) -m 755 MKDIR = mkdir -m 755 -SYMLINK ?= cp -as +SYMLINK ?= ln -s ETCDIR = $(sysconfdir)/$(PACKAGE) DATADIR = $(datarootdir)/$(PACKAGE) @@ -78,8 +78,11 @@ $(MKDIR) -p $(DESTDIR)$(PYTHONDIR)/$$pkg; \ for item in $$(find $$pkg/*); do \ $(INSTALL_DATA) -D $$item $(DESTDIR)$(PYTHONDIR)/$$item; \ - done; echo $(PYTHONLIBDIR); \ - [ -z "$(PYTHONLIBDIR)" ] || $(SYMLINK) $(DESTDIR)$(PYTHONDIR)/$$pkg $(DESTDIR)$(PYTHONLIBDIR); \ + done; \ + [ -z "$(PYTHONLIBDIR)" ] || for item in $$(find $$pkg/*) ; do \ + $(MKDIR) -p $(DESTDIR)$(PYTHONLIBDIR)/$${item%/*}; \ + $(SYMLINK) $(PYTHONDIR)/$$item $(DESTDIR)$(PYTHONLIBDIR)/$$item; \ + done; \ done .PHONY: build user-build install install-dirs install-bin install-config install-doc install-man install-data install-python user-install debian/patches/03_remove_path.patch0000644000000000000000000000055712201512237014453 0ustar Description: we use a different directory structure so no need to do this Author: Andrew Shadura --- a/twms/twms.py +++ b/twms/twms.py @@ -21,7 +21,6 @@ import StringIO import time import datetime -sys.path.append(os.path.join(os.path.realpath(sys.path[0]), "twms")) config_path = "/etc/twms/twms.conf" if os.path.exists(config_path): try: debian/default0000644000000000000000000000020712265366430010543 0ustar # Defaults for twms initscript # sourced by /etc/init.d/twms # installed at /etc/default/twms by the maintainer scripts # PORT="8080" debian/postinst0000644000000000000000000000066212201512237010773 0ustar #!/bin/sh # postinst script for twms set -e if [ "$1" = "configure" ]; then if ! getent passwd twms > /dev/null ; then echo 'Adding system-user for twms' 1>&2 adduser --system --group --quiet --home /var/cache/twms \ --no-create-home --disabled-login twms fi install -d -otwms -gtwms -m2750 /var/log/twms install -d -otwms -gtwms -m750 /var/cache/twms /var/cache/twms/tiles /var/cache/twms/traces fi #DEBHELPER# exit 0 debian/rules0000755000000000000000000000005412201516107010240 0ustar #!/usr/bin/make -f %: dh $@ --with=python2 debian/compat0000644000000000000000000000000212201512237010357 0ustar 9 debian/pyversions0000644000000000000000000000000512201512237011320 0ustar 2.5-