blob: 42d97f61cb23572bc1dfbf12899452dd7b1f98be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
Author: Tzafrir Cohen <tzafrir@debian.org>
Description: Separate directories for code and data.
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,8 @@ PWD=`pwd`
SLEEP_TIME=300
EXCLUDE=--exclude=*.tar.gz --exclude=*~ $(EXCLUDE-FILES)
ALL_BUT_GZ=$(subst $(wildcard *.tar.gz),,$(wildcard *))
+PYDIR=/usr/lib/python2.7/dist-packages/plinth
+DATADIR=/usr/share/plinth
## Catch-all tagets
default: config dirs template css docs dbs
@@ -23,21 +25,17 @@ predepend:
install: default
mkdir -p $(DESTDIR)/etc/init.d $(DESTDIR)/etc/plinth
cp plinth.sample.fhs.config $(DESTDIR)/etc/plinth/plinth.config
- mkdir -p $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/bin \
+ mkdir -p $(DESTDIR)$(PYDIR) $(DESTDIR)$(DATADIR) $(DESTDIR)/usr/bin \
$(DESTDIR)/usr/share/doc/plinth $(DESTDIR)/usr/share/man/man1
rsync -L doc/* $(DESTDIR)/usr/share/doc/plinth/
gzip $(DESTDIR)/usr/share/doc/plinth/plinth.1
mv $(DESTDIR)/usr/share/doc/plinth/plinth.1.gz $(DESTDIR)/usr/share/man/man1
- rsync -rl *.py modules templates vendor themes static \
- --exclude static/doc --exclude ".git/*" --exclude "*.pyc" \
- $(DESTDIR)/usr/lib/python2.7/plinth
- mkdir -p $(DESTDIR)/usr/lib/python2.7/plinth/static/doc
- cp doc/*.html $(DESTDIR)/usr/lib/python2.7/plinth/static/doc
- rm -f $(DESTDIR)/usr/lib/python2.7/plinth/plinth.config
- ln -s ../../../../etc/plinth/plinth.config $(DESTDIR)/usr/lib/python2.7/plinth/plinth.config
+ cp -a *.py modules templates $(DESTDIR)$(PYDIR)/
+ cp -a static themes $(DESTDIR)$(DATADIR)/
+ ln -s ../../../../etc/plinth/plinth.config $(DESTDIR)$(PYDIR)/plinth.config
cp share/init.d/plinth $(DESTDIR)/etc/init.d
rm -f $(DESTDIR)/usr/bin/plinth
- ln -s ../lib/python2.7/plinth/plinth.py $(DESTDIR)/usr/bin/plinth
+ ln -s ../lib/python2.7/dist-packages/plinth/plinth.py $(DESTDIR)/usr/bin/plinth
mkdir -p $(DESTDIR)/var/lib/plinth/cherrypy_sessions $(DESTDIR)/var/log/plinth $(DESTDIR)/var/run
cp -r data/* $(DESTDIR)/var/lib/plinth
rm -f $(DESTDIR)/var/lib/plinth/users/sqlite3.distrib
--- a/plinth.sample.fhs.config
+++ b/plinth.sample.fhs.config
@@ -3,7 +3,7 @@ product_name = Plinth
box_name = FreedomBox
[Path]
-file_root = /usr/lib/python2.7/plinth
+file_root = /usr/share/plinth/static
data_dir = /var/lib/plinth
store_file = %(data_dir)s/store.sqlite3
user_db = %(data_dir)s/users
|