2020-06-01 06:21:25 +02:00
|
|
|
# Maintainer: Manuel Hüsers <aur@huesers.de>
|
|
|
|
# Contributor: Timothée Ravier <tim@siosm.fr>
|
2015-06-09 12:43:30 +02:00
|
|
|
|
|
|
|
pkgname=mozilla-firefox-sync-server-git
|
2020-10-21 14:14:42 +02:00
|
|
|
pkgver=1.9.1.r10.g58b8036
|
|
|
|
pkgrel=5
|
2020-06-02 04:44:55 +02:00
|
|
|
pkgdesc='Mozilla Sync Server for built-in Firefox Sync'
|
2020-06-01 07:09:06 +02:00
|
|
|
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
|
2020-10-21 14:14:42 +02:00
|
|
|
url='https://mozilla-services.readthedocs.io/en/latest/howtos/run-sync-1.5.html'
|
2020-06-01 06:35:29 +02:00
|
|
|
license=('MPL2')
|
2019-02-07 15:10:56 +01:00
|
|
|
depends=('python2' 'python2-virtualenv')
|
2015-06-09 12:43:30 +02:00
|
|
|
makedepends=('git')
|
|
|
|
options=(!debug)
|
2020-06-02 04:44:55 +02:00
|
|
|
conflicts=('mozilla-firefox-sync-server' 'mozilla-firefox-sync-server-hg')
|
|
|
|
provides=('mozilla-firefox-sync-server')
|
|
|
|
install="${pkgname}.install"
|
2015-06-09 12:43:30 +02:00
|
|
|
source=("${pkgname}::git+https://github.com/mozilla-services/syncserver"
|
2020-06-01 06:21:25 +02:00
|
|
|
'ffsync.service'
|
|
|
|
'ffsync.tmpfiles')
|
2015-06-09 12:43:30 +02:00
|
|
|
sha256sums=('SKIP'
|
2020-06-01 06:21:25 +02:00
|
|
|
'8664ad8361d6751aad47e86900270d2efd8b65d520248cd1c164432baba42212'
|
|
|
|
'462bfdccc672339a03622dbe0a76a2df1b4293de8b240e82fe127a6befaa1a89')
|
2017-01-07 00:06:16 +01:00
|
|
|
sha384sums=('SKIP'
|
2020-06-01 06:21:25 +02:00
|
|
|
'a7384b5b55b2377ee4445e45bfd0545435c2a6a19730ff4219340e3c6e8a3b51fcb46e4215093df860f9fa99a0b471ab'
|
|
|
|
'236b285f7e390d31cd13a0ac78c524acfbc8a7325d7b0b114b39f69a5963535d5f1f73bdef575728b2f6e81860c4ea16')
|
2015-06-09 12:43:30 +02:00
|
|
|
backup=('opt/mozilla-firefox-sync-server/syncserver.ini')
|
2020-06-02 04:44:55 +02:00
|
|
|
optdepends=('uwsgi-plugin-python2: Serve the webapp using uwsgi'
|
|
|
|
'mozilla-firefox-account-server: Run your own firefox account server')
|
2015-06-09 12:43:30 +02:00
|
|
|
|
|
|
|
pkgver() {
|
2020-06-02 04:44:55 +02:00
|
|
|
cd "${pkgname}"
|
2020-06-01 06:21:25 +02:00
|
|
|
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
2015-06-09 12:43:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
prepare() {
|
2020-06-02 04:44:55 +02:00
|
|
|
cd "${pkgname}"
|
2015-06-09 12:43:30 +02:00
|
|
|
|
2020-06-01 06:21:25 +02:00
|
|
|
# Change default sqlite database location
|
|
|
|
sed -i "s|/tmp/syncserver.db|/var/lib/ffsync/sync_storage.db|g" syncserver.ini
|
2020-10-21 14:14:42 +02:00
|
|
|
sed -i "0,/^\#sqluri/s//sqluri/" syncserver.ini
|
2015-06-09 12:43:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2020-06-02 04:44:55 +02:00
|
|
|
cd "${pkgname}"
|
2020-06-01 06:21:25 +02:00
|
|
|
make build
|
2015-06-09 12:43:30 +02:00
|
|
|
|
2020-06-01 07:09:06 +02:00
|
|
|
# MySQL support (should already be included)
|
|
|
|
#local/bin/pip install PyMySQL
|
|
|
|
|
|
|
|
# PostgreSQL support
|
2020-06-01 06:35:29 +02:00
|
|
|
#local/bin/pip install psycopg2
|
2015-06-09 12:43:30 +02:00
|
|
|
|
2020-06-01 06:21:25 +02:00
|
|
|
# There is no install target in the Makefile, so let's do some cleaning
|
|
|
|
rm -rf .git .gitignore Dockerfile Makefile MANIFEST.in README.rst setup.py \
|
|
|
|
local/bin/pep8 local/bin/build* local/bin/easy_install* local/bin/pip* \
|
|
|
|
local/COMPLETE
|
2015-06-09 12:43:30 +02:00
|
|
|
|
2020-06-01 06:21:25 +02:00
|
|
|
# Remove compiled python files as they may cause issues
|
|
|
|
find . -name '*.pyc' -delete
|
2015-06-09 12:43:30 +02:00
|
|
|
|
2020-06-01 06:21:25 +02:00
|
|
|
# Manually fix install path
|
|
|
|
find . -type f -exec sed -i "s|${srcdir}/${pkgname}|/opt/${pkgname/-git}|g" {} \;
|
2015-06-09 12:43:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
2020-06-02 04:44:55 +02:00
|
|
|
cd "${pkgname}"
|
2015-06-09 12:43:30 +02:00
|
|
|
|
2020-06-01 06:21:25 +02:00
|
|
|
#make test
|
2015-06-09 12:43:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2020-06-02 04:44:55 +02:00
|
|
|
cd "${pkgname}"
|
2015-06-09 12:43:30 +02:00
|
|
|
|
2020-06-01 06:21:25 +02:00
|
|
|
# There is no install target in the Makefile, installing manually
|
|
|
|
install -dm 755 "${pkgdir}"/opt/${pkgname/-git} "${pkgdir}"/var/lib/ffsync
|
|
|
|
cp -a * "${pkgdir}"/opt/${pkgname/-git}
|
2015-06-09 12:43:30 +02:00
|
|
|
|
2020-06-01 06:21:25 +02:00
|
|
|
# Manually fix permissions
|
|
|
|
cd "${pkgdir}"/opt/${pkgname/-git}
|
|
|
|
find . -exec chmod go-w {} \;
|
|
|
|
find . -type f -exec chmod a+r {} \;
|
2015-06-09 12:43:30 +02:00
|
|
|
|
2020-06-01 06:21:25 +02:00
|
|
|
install -Dm 644 "${srcdir}"/ffsync.service "${pkgdir}"/usr/lib/systemd/system/ffsync.service
|
|
|
|
install -Dm 644 "${srcdir}"/ffsync.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/ffsync.conf
|
2015-06-09 12:43:30 +02:00
|
|
|
}
|