Switch from Ubuntu 14.04 to CentOS 7

This commit is contained in:
Janek Bevendorff 2017-10-21 17:02:46 +02:00
parent 76ac8dda54
commit 94ea91ec63
2 changed files with 55 additions and 34 deletions

View file

@ -34,6 +34,7 @@ fi
APP="$1" APP="$1"
LOWERAPP="$(echo "$APP" | tr '[:upper:]' '[:lower:]')" LOWERAPP="$(echo "$APP" | tr '[:upper:]' '[:lower:]')"
VERSION="$2" VERSION="$2"
export ARCH=x86_64
mkdir -p $APP.AppDir mkdir -p $APP.AppDir
wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
@ -42,6 +43,8 @@ wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./func
LIB_DIR=./usr/lib LIB_DIR=./usr/lib
if [ -d ./usr/lib/x86_64-linux-gnu ]; then if [ -d ./usr/lib/x86_64-linux-gnu ]; then
LIB_DIR=./usr/lib/x86_64-linux-gnu LIB_DIR=./usr/lib/x86_64-linux-gnu
elif [ -d ./usr/lib64 ]; then
LIB_DIR=./usr/lib64
fi fi
cd $APP.AppDir cd $APP.AppDir
@ -51,7 +54,7 @@ rm -R ./usr/local
rmdir ./opt 2> /dev/null rmdir ./opt 2> /dev/null
# bundle Qt platform plugins and themes # bundle Qt platform plugins and themes
QXCB_PLUGIN="$(find /usr/lib -name 'libqxcb.so' 2> /dev/null)" QXCB_PLUGIN="$(find /usr/lib* -name 'libqxcb.so' 2> /dev/null)"
if [ "$QXCB_PLUGIN" == "" ]; then if [ "$QXCB_PLUGIN" == "" ]; then
QXCB_PLUGIN="$(find /opt/qt*/plugins -name 'libqxcb.so' 2> /dev/null)" QXCB_PLUGIN="$(find /opt/qt*/plugins -name 'libqxcb.so' 2> /dev/null)"
fi fi

View file

@ -14,50 +14,68 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
FROM ubuntu:14.04 FROM centos:7
RUN set -x \ RUN set -x \
&& apt-get update \ && curl "https://copr.fedorainfracloud.org/coprs/bugzy/keepassxc/repo/epel-7/bugzy-keepassxc-epel-7.repo" \
&& apt-get install --yes software-properties-common > /etc/yum.repos.d/bugzy-keepassxc-epel-7.repo
RUN set -x \ RUN set -x \
&& add-apt-repository ppa:george-edison55/cmake-3.x && curl "https://copr.fedorainfracloud.org/coprs/sic/backports/repo/epel-7/sic-backports-epel-7.repo" \
> /etc/yum.repos.d/sic-backports-epel-7.repo
ENV QT_PPA=qt591
ENV QT_VERSION=qt59
RUN set -x \ RUN set -x \
&& add-apt-repository --yes ppa:beineri/opt-${QT_PPA}-trusty && yum clean -y all \
&& yum upgrade -y
# build and runtime dependencies
RUN set -x \ RUN set -x \
&& apt-get update \ && yum install -y \
&& apt-get install --yes \ make \
g++ \ automake \
gcc-c++ \
cmake \ cmake \
libgcrypt20-dev \ libgcrypt16-devel \
${QT_VERSION}base \ qt5-qtbase-devel \
${QT_VERSION}tools \ qt5-linguist \
${QT_VERSION}x11extras \ qt5-qttools \
libxi-dev \ zlib-devel \
libxtst-dev \ qt5-qtx11extras \
zlib1g-dev \ qt5-qtx11extras-devel \
libyubikey-dev \ libXi-devel \
libykpers-1-dev \ libXtst-devel
xvfb \
wget \
file \
fuse \
python
# AppImage dependencies
RUN set -x \ RUN set -x \
&& apt-get install --yes mesa-common-dev && yum install -y \
wget \
fuse-libs
# build libyubikey
ENV YUBIKEY_VERSION=1.13
RUN set -x && yum install -y libusb-devel
RUN set -x \
&& wget "https://developers.yubico.com/yubico-c/Releases/libyubikey-${YUBIKEY_VERSION}.tar.gz" \
&& tar xf libyubikey-${YUBIKEY_VERSION}.tar.gz \
&& cd libyubikey-${YUBIKEY_VERSION} \
&& ./configure --prefix=/usr --libdir=/usr/lib64 \
&& make \
&& make install \
&& cd .. \
&& rm -Rf libyubikey-${YUBIKEY_VERSION}*
# build libykpers-1
ENV YKPERS_VERSION=1.18.0
RUN set -x \
&& wget "https://developers.yubico.com/yubikey-personalization/Releases/ykpers-${YKPERS_VERSION}.tar.gz" \
&& tar xf ykpers-${YKPERS_VERSION}.tar.gz \
&& cd ykpers-${YKPERS_VERSION} \
&& ./configure --prefix=/usr --libdir=/usr/lib64 \
&& make \
&& make install \
&& cd .. \
&& rm -Rf ykpers-${YKPERS_VERSION}*
VOLUME /keepassxc/src VOLUME /keepassxc/src
VOLUME /keepassxc/out VOLUME /keepassxc/out
WORKDIR /keepassxc WORKDIR /keepassxc
ENV CMAKE_PREFIX_PATH=/opt/${QT_VERSION}/lib/cmake
ENV LD_LIBRARY_PATH=/opt/${QT_VERSION}/lib
RUN set -x \
&& echo /opt/${QT_VERSION}/lib > /etc/ld.so.conf.d/${QT_VERSION}.conf