mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-26 14:47:44 +00:00
Faster debian package build
This commit is contained in:
parent
cc91f334e7
commit
ab798568ac
7 changed files with 27 additions and 68 deletions
|
|
@ -1,12 +0,0 @@
|
||||||
*
|
|
||||||
!vdirsyncer/*/*
|
|
||||||
!vdirsyncer/*
|
|
||||||
!.git/**/*
|
|
||||||
!.git/*
|
|
||||||
!debian/*/*
|
|
||||||
!debian/*
|
|
||||||
!scripts/*/*
|
|
||||||
!scripts/*
|
|
||||||
!setup.py
|
|
||||||
!Makefile
|
|
||||||
!README.rst
|
|
||||||
1
debian/compat
vendored
1
debian/compat
vendored
|
|
@ -1 +0,0 @@
|
||||||
10
|
|
||||||
20
debian/control
vendored
20
debian/control
vendored
|
|
@ -1,20 +0,0 @@
|
||||||
Source: vdirsyncer-latest
|
|
||||||
Maintainer: Markus Unterwaditzer <markus-debianpkg@unterwaditzer.net>
|
|
||||||
Section: utils
|
|
||||||
Priority: extra
|
|
||||||
Build-Depends: debhelper (>= 9), python3-all, dh-virtualenv (>= 0.8)
|
|
||||||
Standards-Version: 4.0.0
|
|
||||||
Homepage: https://github.com/pimutils/vdirsyncer
|
|
||||||
|
|
||||||
Package: vdirsyncer-latest
|
|
||||||
Architecture: any
|
|
||||||
Pre-Depends: dpkg (>= 1.16.1), python3, ${misc:Pre-Depends}
|
|
||||||
Depends: ${misc:Depends}, ${python3:Depends}
|
|
||||||
Suggests: python3-requests-oauthlib
|
|
||||||
Description: Synchronize calendars and contacts
|
|
||||||
Vdirsyncer synchronizes your calendars and addressbooks between two storages.
|
|
||||||
The most popular purpose is to synchronize a CalDAV/CardDAV server with a local
|
|
||||||
folder or file. The local data can then be accessed via a variety of programs,
|
|
||||||
none of which have to know or worry about syncing to a server.
|
|
||||||
.
|
|
||||||
It aims to be for CalDAV and CardDAV what OfflineIMAP is for IMAP.
|
|
||||||
7
debian/rules
vendored
7
debian/rules
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/make -f
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@ --with python-virtualenv
|
|
||||||
|
|
||||||
override_dh_virtualenv:
|
|
||||||
dh_virtualenv --python /usr/bin/python3 --preinstall requests-oauthlib
|
|
||||||
|
|
@ -6,28 +6,31 @@ FROM $distro:$distrover
|
||||||
ARG distro
|
ARG distro
|
||||||
ARG distrover
|
ARG distrover
|
||||||
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get install -y software-properties-common
|
|
||||||
RUN if [ "$distrover" = "trusty" ]; then \
|
|
||||||
add-apt-repository -y ppa:spotify-jyrki/dh-virtualenv; \
|
|
||||||
fi
|
|
||||||
RUN if [ "$distro" = "debian" ]; then \
|
|
||||||
echo "deb http://deb.debian.org/debian ${distrover}-backports main" > /etc/apt/sources.list.d/backports.list; \
|
|
||||||
fi
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y build-essential fakeroot debhelper git
|
RUN apt-get install -y build-essential fakeroot debhelper git
|
||||||
RUN apt-get install -y python3-all python3-pip
|
RUN apt-get install -y python3-all python3-pip
|
||||||
|
RUN apt-get install -y ruby ruby-dev
|
||||||
|
RUN apt-get install -y python-all python-pip
|
||||||
|
|
||||||
RUN apt-get install -t${distrover}-backports -y dh-virtualenv
|
RUN gem install fpm
|
||||||
|
|
||||||
|
RUN pip2 install virtualenv-tools
|
||||||
RUN pip3 install virtualenv
|
RUN pip3 install virtualenv
|
||||||
RUN python3 -m virtualenv /vdirsyncer/env/
|
RUN virtualenv -p python3 /vdirsyncer/env/
|
||||||
|
|
||||||
COPY . /vdirsyncer/vdirsyncer/
|
COPY . /vdirsyncer/vdirsyncer/
|
||||||
WORKDIR /vdirsyncer/vdirsyncer/
|
WORKDIR /vdirsyncer/vdirsyncer/
|
||||||
|
|
||||||
RUN . /vdirsyncer/env/bin/activate; make install-dev
|
|
||||||
RUN /vdirsyncer/env/bin/python scripts/write-dpkg-changelog.py > debian/changelog
|
|
||||||
RUN . /vdirsyncer/env/bin/activate; dpkg-buildpackage -us -uc
|
|
||||||
RUN mkdir /vdirsyncer/pkgs/
|
RUN mkdir /vdirsyncer/pkgs/
|
||||||
RUN mv /vdirsyncer/*.deb /vdirsyncer/pkgs/
|
|
||||||
|
RUN basename *.tar.gz .tar.gz | cut -d'-' -f2 | sed -e 's/\.dev/~/g' | tee version
|
||||||
|
RUN . /vdirsyncer/env/bin/activate; fpm -s virtualenv -t deb \
|
||||||
|
-n "vdirsyncer-latest" \
|
||||||
|
-v "$(cat version)" \
|
||||||
|
--prefix /opt/venvs/vdirsyncer-latest \
|
||||||
|
*.tar.gz
|
||||||
|
|
||||||
|
RUN mv /vdirsyncer/vdirsyncer/*.deb /vdirsyncer/pkgs/
|
||||||
|
|
||||||
|
WORKDIR /vdirsyncer/pkgs/
|
||||||
|
RUN dpkg -i *.deb
|
||||||
|
RUN LC_ALL=C.UTF-8 LANG=C.UTF-8 /opt/venvs/vdirsyncer-latest/bin/vdirsyncer --version
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,19 @@ set -xe
|
||||||
distro=$1
|
distro=$1
|
||||||
distrover=$2
|
distrover=$2
|
||||||
name=vdirsyncer-$distro-$distrover:latest
|
name=vdirsyncer-$distro-$distrover:latest
|
||||||
|
context="$(mktemp -d)"
|
||||||
|
|
||||||
|
python setup.py sdist -d "$context"
|
||||||
|
cp scripts/dpkg.Dockerfile "$context/Dockerfile"
|
||||||
|
|
||||||
docker build \
|
docker build \
|
||||||
--build-arg distro=$distro \
|
--build-arg distro=$distro \
|
||||||
--build-arg distrover=$distrover \
|
--build-arg distrover=$distrover \
|
||||||
-t $name \
|
-t $name \
|
||||||
-f scripts/dpkg.Dockerfile .
|
"$context"
|
||||||
|
|
||||||
rm -f dist/pkgs/*.deb
|
rm -f dist/pkgs/*.deb
|
||||||
|
mkdir -p dist/
|
||||||
docker run $name tar -c -C /vdirsyncer pkgs | tar x -C dist/
|
docker run $name tar -c -C /vdirsyncer pkgs | tar x -C dist/
|
||||||
package_cloud push pimutils/vdirsyncer/$distro/$distrover --skip-errors dist/pkgs/*.deb
|
rm -rf "$context"
|
||||||
|
package_cloud push pimutils/vdirsyncer/$distro/$distrover dist/pkgs/*.deb
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
import pkg_resources
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
version = pkg_resources.get_distribution('vdirsyncer').version
|
|
||||||
version = version.replace('.dev', '~')
|
|
||||||
print('vdirsyncer-latest ({}) unstable; urgency=medium'.format(version))
|
|
||||||
print('''
|
|
||||||
* Dummy changelog
|
|
||||||
|
|
||||||
-- Markus Unterwaditzer <markus-debianpkg@unterwaditzer.net> {}
|
|
||||||
'''.format(datetime.datetime.now().strftime('%a, %d %b %Y %H:%M:%S +0200')))
|
|
||||||
Loading…
Reference in a new issue