2 # Copyright (C) 2007-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=seafile-seahub
12 PKG_RELEASE
=$(PKG_SOURCE_VERSION
)
13 PKG_LICENSE
:=Apache-2.0
16 PKG_SOURCE_URL
:=https
://github.com
/haiwen
/seahub.git
17 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
18 PKG_SOURCE_VERSION
:=3fb1288f920de03a4e2e6a06b60671ce98971742
19 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
).
tar.gz
21 include $(INCLUDE_DIR
)/package.mk
22 $(call include_mk
, python-package.mk
)
24 define Package
/seafile-seahub
27 TITLE
:=Seafile server
- seahub component
28 MAINTAINER
:=Gergely Kiss
<mail.gery@gmail.com
>
29 URL
:=http
://seafile.com
/
30 DEPENDS
:=+python
+simplejson
+python-imglib
+python-setuptools
33 define Package
/seafile-seahub
/description
34 The web end of seafile server.
36 NOTE
: in order to have better performance
, language support is turned off by default.
37 Please set
'USE_I18N = True' in seahub_settings.py to support multiple languages.
40 PKG_BUILD_DEPENDS
:=python-setuptools
41 PYTHONPATH
:=$(PYTHONPATH
):$(PKG_BUILD_DIR
)/thirdpart
43 define Download
/django
44 FILE
=Django-1.5
.8.
tar.gz
45 URL
=https
://www.djangoproject.com
/m
/releases
/1.5/
46 MD5SUM
:=675fc736e2c29090f005e217ccf90b5b
49 define Download
/djblets
51 URL
=https
://github.com
/djblets
/djblets.git
53 FILE
=djblets-0.6
.14.
tar.gz
54 VERSION
=58c09bae9b71ac164f78c76746fd2e545aae6c68
57 define Download
/gunicorn
58 FILE
=gunicorn-0.16
.1.
tar.gz
59 URL
=https
://pypi.python.org
/packages
/source
/g
/gunicorn
/
60 MD5SUM
:=d53d5d04d941f2a3089e814e753a218f
65 URL
=https
://pypi.python.org
/packages
/source
/s
/six
/
66 MD5SUM
:=bdbb9e12d3336c198695aa4cf3a61d62
69 define Download
/chardet
70 FILE
=chardet-2.1
.1.
tar.gz
71 URL
=https
://pypi.python.org
/packages
/source
/c
/chardet
/
72 MD5SUM
:=295367fd210d20f3febda615a88e1ef0
76 FILE
=flup-1.0
.2-py2.6.egg
77 URL
=https
://pypi.python.org
/packages
/2.6/f
/flup
/
78 MD5SUM
:=93ec6e3baeee3e5649a8456105178d4e
81 define Download
/lockfile
82 FILE
=lockfile-0.9
.1.
tar.gz
83 URL
=https
://pypi.python.org
/packages
/source
/l
/lockfile
/
84 MD5SUM
:=ce61468d4c1263e3005737bbed2641f0
87 define Download
/python-daemon
88 FILE
=python-daemon-1.5
.5.
tar.gz
89 URL
=https
://pypi.python.org
/packages
/source
/p
/python-daemon
/
90 MD5SUM
:=1f6cd41473c2e201021a0aeef395b2b1
93 define Download
/python-dateutil
94 FILE
=python-dateutil-1.5.
tar.gz
95 URL
=https
://pypi.python.org
/packages
/source
/p
/python-dateutil
/
96 MD5SUM
:=0dcb1de5e5cad69490a3b6ab63f0cfa5
99 define Build
/Configure
103 # Download python dependencies
104 $(eval
$(call Download
,django
))
105 $(eval
$(call Download
,djblets
))
106 $(eval
$(call Download
,gunicorn
))
107 $(eval
$(call Download
,six
))
108 $(eval
$(call Download
,chardet
))
109 $(eval
$(call Download
,flup
))
110 $(eval
$(call Download
,lockfile
))
111 $(eval
$(call Download
,python-daemon
))
112 $(eval
$(call Download
,python-dateutil
))
113 # Install python dependencies
114 $(call HostPython
,, \
115 $(STAGING_DIR_ROOT
)/usr
/bin
/easy_install
-d
$(PKG_BUILD_DIR
)/thirdpart
-Z
-N \
116 $(DL_DIR
)/Django-1.5
.8.
tar.gz
)
117 $(call HostPython
,, \
118 $(STAGING_DIR_ROOT
)/usr
/bin
/easy_install
-d
$(PKG_BUILD_DIR
)/thirdpart
-Z
-N \
119 $(DL_DIR
)/djblets-0.6
.14.
tar.gz
)
120 $(call HostPython
,, \
121 $(STAGING_DIR_ROOT
)/usr
/bin
/easy_install
-d
$(PKG_BUILD_DIR
)/thirdpart
-Z
-N \
122 $(DL_DIR
)/gunicorn-0.16
.1.
tar.gz
)
123 $(call HostPython
,, \
124 $(STAGING_DIR_ROOT
)/usr
/bin
/easy_install
-d
$(PKG_BUILD_DIR
)/thirdpart
-Z
-N \
125 $(DL_DIR
)/six-1.4
.1.
tar.gz
)
126 $(call HostPython
,, \
127 $(STAGING_DIR_ROOT
)/usr
/bin
/easy_install
-d
$(PKG_BUILD_DIR
)/thirdpart
-Z
-N \
128 $(DL_DIR
)/chardet-2.1
.1.
tar.gz
)
129 $(call HostPython
,, \
130 $(STAGING_DIR_ROOT
)/usr
/bin
/easy_install
-d
$(PKG_BUILD_DIR
)/thirdpart
-Z
-N \
131 $(DL_DIR
)/flup-1.0
.2-py2.6.egg
)
132 $(call HostPython
,, \
133 $(STAGING_DIR_ROOT
)/usr
/bin
/easy_install
-d
$(PKG_BUILD_DIR
)/thirdpart
-Z
-N \
134 $(DL_DIR
)/lockfile-0.9
.1.
tar.gz
)
135 $(call HostPython
,, \
136 $(STAGING_DIR_ROOT
)/usr
/bin
/easy_install
-d
$(PKG_BUILD_DIR
)/thirdpart
-Z
-N \
137 $(DL_DIR
)/python-daemon-1.5
.5.
tar.gz
)
138 $(call HostPython
,, \
139 $(STAGING_DIR_ROOT
)/usr
/bin
/easy_install
-d
$(PKG_BUILD_DIR
)/thirdpart
-Z
-N \
140 $(DL_DIR
)/python-dateutil-1.5.
tar.gz
)
143 define Package
/seafile-seahub
/install
144 $(INSTALL_DIR
) $(1)/usr
/share
/seafile
/seafile-server
/seahub
145 $(CP
) $(PKG_BUILD_DIR
)/{locale
,media
,fabfile
,seahub
,sql
,tests
,thirdpart
,tools
} $(1)/usr
/share
/seafile
/seafile-server
/seahub
/
146 $(CP
) $(PKG_BUILD_DIR
)/*.
{sh
,template
,py
,txt
} $(1)/usr
/share
/seafile
/seafile-server
/seahub
/
147 $(CP
) $(PKG_BUILD_DIR
)/{CONTRIBUTORS
,HACKING
,README.markdown
} $(1)/usr
/share
/seafile
/seafile-server
/seahub
/
148 $(CP
) $(PKG_BUILD_DIR
)/pylintrc
* $(1)/usr
/share
/seafile
/seafile-server
/seahub
/
149 # fix python exec path in scripts
150 sed
-i
's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr
/share
/seafile
/seafile-server
/seahub
/thirdpart
/chardetect.py
151 sed
-i
's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr
/share
/seafile
/seafile-server
/seahub
/thirdpart
/django-admin.py
152 sed
-i
's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr
/share
/seafile
/seafile-server
/seahub
/thirdpart
/gunicorn
153 sed
-i
's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr
/share
/seafile
/seafile-server
/seahub
/thirdpart
/gunicorn_django
154 sed
-i
's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr
/share
/seafile
/seafile-server
/seahub
/thirdpart
/gunicorn_paster
155 find
$(1) -name
"*\.pyc" -o
-name
"*\.pyo" | xargs
rm -f
156 sed
-i
"s/\(SEAFILE_VERSION\s*=\s*\)'\([0-9]\.[0-9]\.[0-9]\)'/\1'$(PKG_VERSION)'/g" $(1)/usr
/share
/seafile
/seafile-server
/seahub
/seahub
/settings.py
159 $(eval
$(call BuildPackage
,seafile-seahub
))