new package: bitlbee

This commit is contained in:
Tee KOBAYASHI 2022-04-01 16:56:54 +09:00 committed by xtkoba
parent d51f877d52
commit c536e7eb96
8 changed files with 161 additions and 0 deletions

View File

@ -0,0 +1,28 @@
--- a/bitlbee.conf
+++ b/bitlbee.conf
@@ -108,14 +108,14 @@
## Specify an alternative MOTD (Message Of The Day) file. Default value depends
## on the --etcdir argument to configure.
##
-# MotdFile = /etc/bitlbee/motd.txt
+# MotdFile = @TERMUX_PREFIX@/etc/bitlbee/motd.txt
## ConfigDir
##
## Specify an alternative directory to store all the per-user configuration
## files. (.nicks/.accounts)
##
-# ConfigDir = /var/lib/bitlbee
+# ConfigDir = @TERMUX_PREFIX@/var/lib/bitlbee
## Ping settings
##
@@ -167,7 +167,7 @@
## The location of this file may be different on other distros/OSes. For
## example, try /etc/ssl/ca-bundle.pem on OpenSUSE.
##
-# CAfile = /etc/ssl/certs/ca-certificates.crt
+# CAfile = @TERMUX_PREFIX@/etc/tls/cert.pem
[defaults]

29
packages/bitlbee/build.sh Normal file
View File

@ -0,0 +1,29 @@
TERMUX_PKG_HOMEPAGE=https://www.bitlbee.org/
TERMUX_PKG_DESCRIPTION="An IRC to other chat networks gateway"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3.6-1
TERMUX_PKG_SRCURL=https://github.com/bitlbee/bitlbee/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=81c6357fe08a8941221472e3790e2b351e3a8a41f9af0cf35395fdadbc8ac6cb
TERMUX_PKG_DEPENDS="ca-certificates, glib, libgcrypt, libgnutls"
termux_step_pre_configure() {
LDFLAGS+=" -lgcrypt"
}
termux_step_configure_autotools() {
sh "$TERMUX_PKG_SRCDIR/configure" \
--prefix=$TERMUX_PREFIX \
$TERMUX_PKG_EXTRA_CONFIGURE_ARGS
}
termux_step_post_make_install() {
make install-etc install-dev
}
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
mkdir -p $TERMUX_PREFIX/var/lib/bitlbee
EOF
}

View File

@ -0,0 +1,31 @@
--- a/configure
+++ b/configure
@@ -7,22 +7,22 @@
## Copyright 2002 Lucumo ##
##############################
-prefix='/usr/local/'
+prefix='@TERMUX_PREFIX@/'
bindir='$prefix/bin/'
-sbindir='$prefix/sbin/'
+sbindir='$prefix/bin/'
etcdir='$prefix/etc/bitlbee/'
mandir='$prefix/share/man/'
datadir='$prefix/share/bitlbee/'
-config='/var/lib/bitlbee/'
+config='$prefix/var/lib/bitlbee/'
libdir='$prefix/lib/'
plugindir='$prefix/lib/bitlbee/'
includedir='$prefix/include/bitlbee/'
systemdsystemunitdir=''
-libevent='/usr/'
-pidfile='/var/run/bitlbee.pid'
+libevent='$prefix/'
+pidfile='$prefix/var/run/bitlbee.pid'
ipcsocket=''
pcdir='$prefix/lib/pkgconfig'
-systemlibdirs="/lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib"
+systemlibdirs="@TERMUX_PREFIX@/lib"
sysroot=''
configure_args="$@"

View File

@ -0,0 +1,11 @@
--- a/ipc.c
+++ b/ipc.c
@@ -824,7 +824,7 @@
char *ipc_master_save_state()
{
- char *fn = g_strdup("/tmp/bee-restart.XXXXXX");
+ char *fn = g_strdup("@TERMUX_PREFIX@/tmp/bee-restart.XXXXXX");
int fd = mkstemp(fn);
GSList *l;
FILE *fp;

View File

@ -0,0 +1,11 @@
--- a/otr.c
+++ b/otr.c
@@ -2021,7 +2021,7 @@
myfgets(accountname, 512, input);
myfgets(protocol, 512, input);
- strncpy(filename, "/tmp/bitlbee-XXXXXX", 128);
+ strncpy(filename, "@TERMUX_PREFIX@/tmp/bitlbee-XXXXXX", 128);
tempfd = mkstemp(filename);
close(tempfd);

View File

@ -0,0 +1,11 @@
--- a/protocols/purple/ft-direct.c
+++ b/protocols/purple/ft-direct.c
@@ -123,7 +123,7 @@
{
if (purple_xfer_get_type(xfer) == PURPLE_XFER_RECEIVE) {
/* This should suppress the stupid file dialog. */
- purple_xfer_set_local_filename(xfer, "/tmp/wtf123");
+ purple_xfer_set_local_filename(xfer, "@TERMUX_PREFIX@/tmp/wtf123");
/* Sadly the xfer struct is still empty ATM so come back after
the caller is done. */

View File

@ -0,0 +1,20 @@
--- a/protocols/purple/ft.c
+++ b/protocols/purple/ft.c
@@ -108,7 +108,7 @@
xfer->ui_data = px;
px->xfer = xfer;
- px->fn = mktemp(g_strdup("/tmp/bitlbee-purple-ft.XXXXXX"));
+ px->fn = mktemp(g_strdup("@TERMUX_PREFIX@/tmp/bitlbee-purple-ft.XXXXXX"));
px->fd = -1;
px->ic = purple_ic_by_pa(xfer->account);
@@ -285,7 +285,7 @@
px->ft = ft;
px->ft->free = prpl_xfer_free;
- dir = g_strdup("/tmp/bitlbee-purple-ft.XXXXXX");
+ dir = g_strdup("@TERMUX_PREFIX@/tmp/bitlbee-purple-ft.XXXXXX");
if (!mkdtemp(dir)) {
imcb_error(ic, "Could not create temporary file for file transfer");
g_free(px);

View File

@ -0,0 +1,20 @@
--- a/utils/bitlbeed.c
+++ b/utils/bitlbeed.c
@@ -333,7 +333,7 @@
" -l Specify a logfile. (Default: none)\n"
" -r Rate limiting: Ignore a host for z seconds when it connects for more\n"
" than y times in x seconds. (Default: 600,5,900. Disable: 0,0,0)\n"
- " -u Use a local socket, by default /tmp/bitlbee (override with -i <filename>)\n"
+ " -u Use a local socket, by default @TERMUX_PREFIX@/tmp/bitlbee (override with -i <filename>)\n"
" -d Don't fork for listening (for debugging purposes)\n"
" -h This information\n", argv[0]);
return(NULL);
@@ -341,7 +341,7 @@
}
if (set->interface == NULL) {
- set->interface = (set->local) ? "/tmp/bitlbee" : "0.0.0.0";
+ set->interface = (set->local) ? "@TERMUX_PREFIX@/tmp/bitlbee" : "0.0.0.0";
}
if (optind == argc) {