termux-packages/x11-packages/pypanel/build.sh

58 lines
1.8 KiB
Bash
Raw Normal View History

TERMUX_PKG_HOMEPAGE=https://sourceforge.net/projects/pypanel/
2018-09-10 00:42:26 +02:00
TERMUX_PKG_DESCRIPTION="A lightweight panel/taskbar for X11 window managers written in python."
TERMUX_PKG_LICENSE="GPL-2.0"
2019-05-17 00:18:48 +02:00
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
2018-09-10 00:42:26 +02:00
TERMUX_PKG_VERSION=2.4
2020-02-24 20:20:50 +01:00
TERMUX_PKG_REVISION=18
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/pypanel/PyPanel-${TERMUX_PKG_VERSION}.tar.gz
2018-09-10 00:42:26 +02:00
TERMUX_PKG_SHA256=4e612b43c61b3a8af7d57a0364f6cd89df481dc41e20728afa643e9e3546e911
TERMUX_PKG_DEPENDS="freetype, imlib2, libandroid-shmem, libx11, libxft, python2, python2-xlib"
TERMUX_PKG_BUILD_IN_SRC=true
2018-09-10 00:42:26 +02:00
TERMUX_PKG_CONFFILES="etc/pypanelrc"
termux_step_make() {
"${CC}" -DNDEBUG \
-fwrapv \
-Wall \
-Wstrict-prototypes \
-fno-strict-aliasing \
-Oz \
-fPIC \
-DHAVE_XFT=1 \
-DIMLIB2_FIX=1 \
-I/data/data/com.termux/files/usr/include \
-I/data/data/com.termux/files/usr/include/freetype2 \
-I/data/data/com.termux/files/usr/include/libpng16 \
-c ppmodule.c \
-o ppmodule.o \
2018-09-10 00:42:26 +02:00
"${CC}" -shared \
ppmodule.o \
$LDFLAGS \
-lfreetype \
-lXft \
-lImlib2 \
-lpython2.7 \
-lX11 \
-landroid-shmem \
-o ppmodule.so
2018-09-10 00:42:26 +02:00
}
termux_step_make_install() {
mkdir -p "${TERMUX_PREFIX}/bin"
cp -f pypanel "${TERMUX_PREFIX}/bin/pypanel"
chmod 755 "${TERMUX_PREFIX}/bin/pypanel"
2018-09-10 00:42:26 +02:00
mkdir -p "${TERMUX_PREFIX}/etc"
cp -f pypanelrc "${TERMUX_PREFIX}/etc/pypanelrc"
chmod 644 "${TERMUX_PREFIX}/etc/pypanelrc"
2018-09-10 00:42:26 +02:00
mkdir -p "${TERMUX_PREFIX}/lib/python2.7/site-packages"
cp ppmodule.so "${TERMUX_PREFIX}/lib/python2.7/site-packages/ppmodule.so"
chmod 644 "${TERMUX_PREFIX}/lib/python2.7/site-packages/ppmodule.so"
2018-09-10 00:42:26 +02:00
mkdir -p "${TERMUX_PREFIX}/lib/python2.7/site-packages/pypanel"
cp -f COPYING README pypanelrc ppicon.png "${TERMUX_PREFIX}/lib/python2.7/site-packages/pypanel/"
chmod 644 ${TERMUX_PREFIX}/lib/python2.7/site-packages/pypanel/*
2018-09-10 00:42:26 +02:00
}