Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

add archlinux build #73

Merged
merged 6 commits into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,12 @@ def package_docker(config, target, src_dir, iteration, clean=False):
dimage = '-e XZ_OPT=-9 --user %d:%d %s' % (os.getuid(), os.getgid(), config['fpm-image'])
fversion = '--epoch 1 --version "%s" --iteration "%s.%s"' % (pkg_ver, pkg_iter, target.split('-')[0])
fparams = ' '.join('--%s "%s"' % (k, v) for k, v in config['fpm-params'].items())
fparams_pacman = ' '.join('--%s "%s"' % (k, v) for k, v in config['fpm-pacman-params'].items())
fdepend = ' '.join('--depends "%s"' % p for p in depend.split() if p).strip()
fpm_args = '%s -a %s -f -s dir -C %s/wkhtmltox %s %s %s' % (
dimage, arch, target, fversion, fparams, fdepend)
fpm_pacman_args = '%s -a %s -f -s dir -C %s/wkhtmltox %s %s %s' % (
dimage, arch, target, fversion, fparams_pacman, fdepend)
archive = 'wkhtmltox-%s-%s.%s' % (pkg_ver, pkg_iter, target)

if output == 'tar':
Expand All @@ -160,6 +163,9 @@ def package_docker(config, target, src_dir, iteration, clean=False):
elif output in ('rpm', 'rpm:bzip2'):
frpm = '-t rpm --rpm-compression %s' % ('xz' if output == 'rpm' else 'bzip2')
shell('docker run --rm -v%s:/tgt -w/tgt %s %s' % (os.path.abspath('targets'), fpm_args, frpm))
elif output in ('pacman'):
fpacman = '-t pacman'
palytoxin marked this conversation as resolved.
Show resolved Hide resolved
shell('docker run --rm -v%s:/tgt -w/tgt %s %s' % (os.path.abspath('targets'), fpm_pacman_args, fpacman))

if clean:
shell('rm -fr %s' % tgt_dir)
Expand Down
26 changes: 26 additions & 0 deletions build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,22 @@ docker-targets:
xorg-x11-fonts-Type1
zlib

archlinux:
source: docker/Dockerfile.archlinux
args:
from: archlinux:latest
output: pacman
ashkulz marked this conversation as resolved.
Show resolved Hide resolved
matrix: ['amd64']
depend: >
openssl
zlib
fontconfig
freetype2
libjpeg
libpng
libxext
libxrender

amazonlinux2:
source: docker/Dockerfile.centos
args:
Expand Down Expand Up @@ -516,3 +532,13 @@ fpm-params:
url: https://wkhtmltopdf.org/
prefix: /usr/local
category: utils

fpm-pacman-params:
name: wkhtmltox
description: convert HTML to PDF and various image formats using QtWebkit
license: LGPLv3
vendor: wkhtmltopdf
maintainer: Ashish Kulkarni <[email protected]>
url: https://wkhtmltopdf.org/
prefix: /usr
category: utils
22 changes: 22 additions & 0 deletions docker/Dockerfile.archlinux
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ARG from
FROM ${from}

ENV CFLAGS=-w CXXFLAGS=-w
WORKDIR /root/
RUN curl -o gcc-lib.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc7-libs/gcc7-libs-7.4.1%2B20181207-3-x86_64.pkg.tar.xz && \
curl -o gcc.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc7/gcc7-7.4.1%2B20181207-3-x86_64.pkg.tar.xz && \
pacman -Sy --noconfirm \
diffutils \
fontconfig \
freetype2 \
libx11 \
libxext \
libxrender \
libjpeg-turbo \
libpng \
make && \
pacman -U /root/gcc.pkg.tar.xz /root/gcc-lib.pkg.tar.xz --noconfirm && \
pacman -Scc --noconfirm
RUN ln -s /usr/bin/gcc-7 /usr/bin/gcc && \
ln -s /usr/bin/g++-7 /usr/bin/g++