static link libclipboard

This commit is contained in:
Craig 2020-02-11 21:10:10 +00:00
parent 92f2156eef
commit e1aa9ccdc4
3 changed files with 4 additions and 21 deletions

View File

@ -102,7 +102,7 @@ RUN set -eux; \
cd /tmp ; \ cd /tmp ; \
git clone https://github.com/jtanx/libclipboard ; \ git clone https://github.com/jtanx/libclipboard ; \
cd libclipboard ; \ cd libclipboard ; \
cmake -DBUILD_SHARED_LIBS=ON -DLIBCLIPBOARD_FORCE_X11=on -DLIBCLIPBOARD_ADD_SOVERSION=ON --prefix=/usr/local . ; \ cmake . ; \
make -j4; \ make -j4; \
make install; \ make install; \
rm -rf /tmp/libclipboard rm -rf /tmp/libclipboard

View File

@ -8,28 +8,11 @@ ARG USERNAME=neko
ARG USER_UID=1000 ARG USER_UID=1000
ARG USER_GID=$USER_UID ARG USER_GID=$USER_UID
#
# install libclipboard
RUN set -eux; apt-get update; \
apt-get install -y --no-install-recommends ca-certificates git cmake pkg-config build-essential libx11-dev ; \
cd /tmp ; \
git clone https://github.com/jtanx/libclipboard ; \
cd libclipboard ; \
cmake -DBUILD_SHARED_LIBS=ON -DLIBCLIPBOARD_FORCE_X11=on -DLIBCLIPBOARD_ADD_SOVERSION=ON --prefix=/usr/local . ; \
make -j4; \
make install; \
rm -rf /tmp/libclipboard ; \
#
# clean up
apt-get autoremove -y git cmake pkg-config build-essential libx11-dev; \
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
# #
# install neko dependencies # install neko dependencies
RUN set -eux; apt-get update; \ RUN set -eux; apt-get update; \
apt-get install -y --no-install-recommends wget ca-certificates pulseaudio openbox dbus-x11 xserver-xorg-video-dummy supervisor; \ apt-get install -y --no-install-recommends wget ca-certificates pulseaudio openbox dbus-x11 xserver-xorg-video-dummy supervisor; \
apt-get install -y --no-install-recommends libxrandr2 libxv1 libopus0 libvpx4; \ apt-get install -y --no-install-recommends libxcb1 libxrandr2 libxv1 libopus0 libvpx4; \
# #
# create a non-root user # create a non-root user
groupadd --gid $USER_GID $USERNAME; \ groupadd --gid $USER_GID $USERNAME; \

View File

@ -7,8 +7,8 @@
package xorg package xorg
/* /*
#cgo linux CFLAGS: -I/usr/src #cgo linux CFLAGS: -I/usr/src -I/usr/local/include/
#cgo linux LDFLAGS: -L/usr/src -lX11 -lXtst -lXrandr -lclipboard #cgo linux LDFLAGS: /usr/local/lib/libclipboard.a -L/usr/src -L/usr/local/lib -lX11 -lXtst -lXrandr -lxcb
#include "xorg.h" #include "xorg.h"
*/ */