summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2014-09-10 11:36:16 +0200
committerFolker Bernitt <fbernitt@thoughtworks.com>2014-09-10 12:08:34 +0200
commitdfd12bc6c6625ed1f2d811a8abbc491688d6bd54 (patch)
tree4eaf764b7fd64f584a6b988ce544ea77de253af4
parent336c61806095752d08da03657b460e8532ee7324 (diff)
Build and add resources at the right locations.
- include package data into build - build resources as part of debian dpkg-buildpackage use: dpkg-buildpackage -rfakeroot -uc -us to build the package
-rw-r--r--debian/control3
-rwxr-xr-xdebian/rules9
-rw-r--r--service/pixelated/user_agent.py2
-rw-r--r--service/setup.py3
-rw-r--r--web-ui/Makefile1
5 files changed, 16 insertions, 2 deletions
diff --git a/debian/control b/debian/control
index aa4fd051..f7addb1a 100644
--- a/debian/control
+++ b/debian/control
@@ -2,11 +2,12 @@ Source: pixelated-user-agent
Maintainer: Thoughtworks <pixelated-team@thoughtworks.com>
Section: python
Priority: optional
-Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 7.4.3)
+Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 7.4.3), ruby-compass, nodejs
Standards-Version: 3.9.1
Homepage: http://pixelated-project.org
Vcs-Git: https://github.com/pixelated-project/pixelated-user-agent.git
Vcs-Browser: https://github.com/pixelated-project/pixelated-user-agent
+X-Python-Version: >= 2.7
Package: pixelated-user-agent
Architecture: all
diff --git a/debian/rules b/debian/rules
index b6082fa2..80a8ab61 100755
--- a/debian/rules
+++ b/debian/rules
@@ -27,6 +27,15 @@ include /usr/share/dpkg/default.mk
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
+override_dh_auto_clean:
+ dh_auto_clean
+ dh_auto_clean --sourcedirectory=web-ui
+override_dh_auto_build:
+ dh_auto_build
+ dh_auto_build --sourcedirectory=web-ui
+override_dh_auto_install:
+ dh_auto_install
+ dh_auto_install --sourcedirectory=web-ui
diff --git a/service/pixelated/user_agent.py b/service/pixelated/user_agent.py
index 33b43a3e..bf48e740 100644
--- a/service/pixelated/user_agent.py
+++ b/service/pixelated/user_agent.py
@@ -37,6 +37,8 @@ static_folder = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", ".
# this is a workaround for packaging
if not os.path.exists(static_folder):
static_folder = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "web-ui", "app"))
+if not os.path.exists(static_folder):
+ static_folder = os.path.join('usr', 'share', 'pixelated-user-agent')
app = Flask(__name__, static_url_path='', static_folder=static_folder)
diff --git a/service/setup.py b/service/setup.py
index c86eae99..cb6ce68a 100644
--- a/service/setup.py
+++ b/service/setup.py
@@ -89,5 +89,6 @@ setup(name='pixelated-user-agent',
'pixelated-user-agent = pixelated.user_agent:setup'
]
},
- data_files=data_files()
+ data_files=data_files(),
+ include_package_data=True
)
diff --git a/web-ui/Makefile b/web-ui/Makefile
index bb159131..31d4c671 100644
--- a/web-ui/Makefile
+++ b/web-ui/Makefile
@@ -27,6 +27,7 @@ clean:
install:
+ rm -Rf $(DESTDIR)/usr/pixelated $(DESTDIR)/usr/web-ui # Fix: delete files generated by python setup.py install that are in the wrong place
install -d $(DESTDIR)/usr/share/pixelated-user-agent
cp -r dist/* $(DESTDIR)/usr/share/pixelated-user-agent