From e103dc34af0cc82d5d02cf46ff8d0d1fa8b59edd Mon Sep 17 00:00:00 2001 From: Eduardo Mayorga Date: Mon, 8 Dec 2014 16:41:46 -0600 Subject: [PATCH] Initial import (#1164078). --- .gitignore | 1 + sources | 1 + twms-0.05-fix-install-path.patch | 138 +++++++++++++++++++++++++++++++ twms.spec | 61 ++++++++++++++ 4 files changed, 201 insertions(+) create mode 100644 twms-0.05-fix-install-path.patch create mode 100644 twms.spec diff --git a/.gitignore b/.gitignore index e69de29..26cf54d 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/twms-0.05t.tar.bz2 diff --git a/sources b/sources index e69de29..09c5cee 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +1e57db2b180ffb39480b662e9e625107 twms-0.05t.tar.bz2 diff --git a/twms-0.05-fix-install-path.patch b/twms-0.05-fix-install-path.patch new file mode 100644 index 0000000..e7d948c --- /dev/null +++ b/twms-0.05-fix-install-path.patch @@ -0,0 +1,138 @@ +diff -rupN twms-0.05r/Makefile twms-0.05r.new/Makefile +--- twms-0.05r/Makefile 2013-08-10 12:35:13.000000000 -0600 ++++ twms-0.05r.new/Makefile 2014-11-13 21:16:08.836075323 -0600 +@@ -12,13 +12,5 @@ DIRS = $(CACHEDIR)/traces $(CACHEDIR)/ti + PYTHONPKGS = twms + + user-install:: +- sed -i \ +- -e 's,/etc/twms,$(ETCDIR),g' \ +- -e 's,/var/cache/twms,$(CACHEDIR),g' \ +- -e 's,/usr/share/twms,$(DATADIR),g' \ +- -e 's,/usr/share/pyshared,$(PYTHONDIR),g' \ +- $(DESTDIR)$(ETCDIR)/twms.conf \ +- $(DESTDIR)$(PYTHONDIR)/twms/twms.conf \ +- $(DESTDIR)$(PYTHONDIR)/twms/twms.py + mv $(DESTDIR)$(bindir)/twms.py $(DESTDIR)$(bindir)/twms + +diff -rupN twms-0.05r/Makefile.mk twms-0.05r.new/Makefile.mk +--- twms-0.05r/Makefile.mk 2013-08-10 12:35:13.000000000 -0600 ++++ twms-0.05r.new/Makefile.mk 2014-11-13 21:16:37.653173207 -0600 +@@ -34,7 +34,7 @@ build: user-build + + user-build user-install:: + +-install: install-dirs install-bin install-config install-doc install-man install-data install-python user-install ++install: install-dirs install-bin install-config install-doc install-man install-data install-python user-install + + install-dirs: + for item in $(DIRS); do \ +@@ -72,14 +72,14 @@ install-data: + done + + install-python: +- [ -z "$(PYTHONSCRIPTS)" ] || $(INSTALL) -d $(DESTDIR)$(PYTHONDIR) ++# [ -z "$(PYTHONSCRIPTS)" ] || $(INSTALL) -d $(DESTDIR)$(PYTHONDIR) + [ -z "$(PYTHONLIBDIR)" ] || $(MKDIR) -p $(DESTDIR)$(PYTHONLIBDIR) + for pkg in $(PYTHONPKGS); do \ +- $(MKDIR) -p $(DESTDIR)$(PYTHONDIR)/$$pkg; \ ++ $(MKDIR) -p $(DESTDIR)$(PYTHOLIBDIR)/$$pkg; \ + for item in $$(find $$pkg/*); do \ +- $(INSTALL_DATA) -D $$item $(DESTDIR)$(PYTHONDIR)/$$item; \ ++ $(INSTALL_DATA) -D $$item $(DESTDIR)$(PYTHONLIBDIR)/$$item; \ + done; echo $(PYTHONLIBDIR); \ +- [ -z "$(PYTHONLIBDIR)" ] || $(SYMLINK) $(DESTDIR)$(PYTHONDIR)/$$pkg $(DESTDIR)$(PYTHONLIBDIR); \ ++ #[ -z "$(PYTHONLIBDIR)" ] || $(SYMLINK) $(DESTDIR)$(PYTHONDIR)/$$pkg $(DESTDIR)$(PYTHONLIBDIR); \ + done + + .PHONY: build user-build install install-dirs install-bin install-config install-doc install-man install-data install-python user-install +diff -rupN twms-0.05r/Makefile.mk.origin twms-0.05r.new/Makefile.mk.origin +--- twms-0.05r/Makefile.mk.origin 1969-12-31 18:00:00.000000000 -0600 ++++ twms-0.05r.new/Makefile.mk.origin 2014-11-13 20:20:56.049021952 -0600 +@@ -0,0 +1,85 @@ ++PREFIX ?= /usr ++prefix ?= $(PREFIX) ++ ++ifeq ($(prefix),/usr) ++sysconfdir ?= /etc ++localstatedir ?= /var ++else ++sysconfdir ?= $(prefix)/etc ++localstatedir ?= $(prefix)/var ++endif ++ ++exec_prefix ?= $(prefix) ++bindir ?= $(exec_prefix)/bin ++datarootdir ?= $(prefix)/share ++docdir ?= $(datarootdir)/doc/$(PACKAGE) ++mandir ?= $(datarootdir)/man ++libdir ?= $(exec_prefix)/lib ++ ++INSTALL ?= install ++INSTALL_DATA = $(INSTALL) -m 644 ++INSTALL_PROGRAM = $(INSTALL) -m 755 ++MKDIR = mkdir -m 755 ++ ++SYMLINK ?= cp -as ++ ++ETCDIR = $(sysconfdir)/$(PACKAGE) ++DATADIR = $(datarootdir)/$(PACKAGE) ++PYTHONDIR ?= $(datarootdir)/pyshared ++ ++PYTHON ?= python ++PYTHONLIBDIR ?= $(shell $(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib()") ++ ++build: user-build ++ ++user-build user-install:: ++ ++install: install-dirs install-bin install-config install-doc install-man install-data install-python user-install ++ ++install-dirs: ++ for item in $(DIRS); do \ ++ $(INSTALL) -d $(DESTDIR)$$item; \ ++ done ++ ++install-bin: ++ [ -z "$(BIN)" ] || $(INSTALL) -d $(DESTDIR)$(bindir) ++ for item in $(BIN); do \ ++ $(INSTALL_PROGRAM) -D $$item $(DESTDIR)$(bindir)/$$(basename $$item); \ ++ done ++ ++install-config: ++ [ -z "$(ETC)" ] || $(INSTALL) -d $(DESTDIR)$(ETCDIR) ++ for item in $(ETC); do \ ++ $(INSTALL_DATA) -D $$item $(DESTDIR)$(ETCDIR)/$$(basename $$item); \ ++ done ++ ++install-doc: ++ [ -z "$(DOC)" ] || $(INSTALL) -d $(DESTDIR)$(docdir) ++ for item in $(DOC); do \ ++ $(INSTALL_DATA) -D $$item $(DESTDIR)$(docdir)/$$(basename $$item); \ ++ done ++ ++install-man: ++ [ -z "$(MANPAGES)" ] || $(INSTALL) -d $(DESTDIR)$(mandir) ++ for item in $(MANPAGES); do \ ++ $(INSTALL_DATA) -D $$item $(DESTDIR)$(mandir)/man$${item##*.}/$$item; \ ++ done ++ ++install-data: ++ [ -z "$(DATA)" ] || $(INSTALL) -d $(DESTDIR)$(DATADIR) ++ for item in $(DATA); do \ ++ $(INSTALL_DATA) -D $$item $(DESTDIR)$(DATADIR)/$$item; \ ++ done ++ ++install-python: ++ [ -z "$(PYTHONSCRIPTS)" ] || $(INSTALL) -d $(DESTDIR)$(PYTHONDIR) ++ [ -z "$(PYTHONLIBDIR)" ] || $(MKDIR) -p $(DESTDIR)$(PYTHONLIBDIR) ++ for pkg in $(PYTHONPKGS); do \ ++ $(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 ++ ++.PHONY: build user-build install install-dirs install-bin install-config install-doc install-man install-data install-python user-install +Los ficheros binarios twms-0.05r/.Makefile.mk.swp y twms-0.05r.new/.Makefile.mk.swp son distintos diff --git a/twms.spec b/twms.spec new file mode 100644 index 0000000..7fbf836 --- /dev/null +++ b/twms.spec @@ -0,0 +1,61 @@ +Name: twms +Version: 0.05 +Release: 2%{?dist} +Summary: Tiny web map service + +Group: Applications/Internet +License: WTFPL +URL: https://code.google.com/p/twms/ +Source0: https://twms.googlecode.com/files/%{name}-%{version}t.tar.bz2 +Patch0: %{name}-%{version}-fix-install-path.patch + +BuildRequires: python2-devel + +Requires: python-webpy +Requires: pyproj +Requires: python-imaging + +BuildArch: noarch + +%description +tWMS is a tiny WMS server written in Python and using tiles as a backend +storage. + +%prep +%setup -q -n %{name}-%{version}r +%patch0 -p1 + +# Remove shebang +sed -i 1d twms/twms.py + + +%build +# Nothing to build + + +%install +PYTHON=%{__python2} %make_install + + +%files +%{!?_licensedir:%global license %%doc} +%license COPYING +%doc README.md +%{_bindir}/twms +%{python2_sitelib}/%{name}/ +%{_mandir}/man1/twms.1.gz +%{_datadir}/twms/ +# Excluding empty file +%exclude %{_datadir}/twms/irs_nxt.jpg +%dir %{_sysconfdir}/twms +%config(noreplace) %{_sysconfdir}/twms/twms.conf + + +%changelog +* Wed Nov 26 2014 Eduardo Mayorga Téllez - 0.05-2 +- Adding missing created directory +- Ditching empty file irs_nxt.jpg + +* Fri Nov 14 2014 Eduardo Mayorga Téllez - 0.05-1 +- Initial packaging +