summaryrefslogtreecommitdiffstats
path: root/ftp
diff options
context:
space:
mode:
authorPavel Vinogradov2021-10-04 19:41:51 -0400
committerPavel Vinogradov2021-10-04 20:02:13 -0400
commit7cccea592159e55bb576a727d2a84db248c1085c (patch)
tree1b16d5d07b750be6348796c98643e2b2eee2758f /ftp
parent7e9da2ce982b22806c20012b6b5abbf48585dc1b (diff)
ftp/transmission-i2p: new spell, an anonymous torrent client Transmission-I2P
Diffstat (limited to 'ftp')
-rwxr-xr-xftp/transmission-i2p/BUILD12
-rwxr-xr-xftp/transmission-i2p/CONFIGURE15
-rwxr-xr-xftp/transmission-i2p/DEPENDS34
-rwxr-xr-xftp/transmission-i2p/DETAILS15
-rw-r--r--ftp/transmission-i2p/HISTORY4
-rwxr-xr-xftp/transmission-i2p/PREPARE2
-rwxr-xr-xftp/transmission-i2p/PRE_BUILD4
-rw-r--r--ftp/transmission-i2p/patches/package_name.patch31
-rw-r--r--ftp/transmission-i2p/patches/platform-quota.patch13
9 files changed, 130 insertions, 0 deletions
diff --git a/ftp/transmission-i2p/BUILD b/ftp/transmission-i2p/BUILD
new file mode 100755
index 0000000000..4264819f66
--- /dev/null
+++ b/ftp/transmission-i2p/BUILD
@@ -0,0 +1,12 @@
+OPTS+=" $TRANSMISSION_I2P_OPTS --program-suffix=-i2p" &&
+
+CFLAGS="-I../third-party ${CFLAGS}" &&
+
+case "$HOST" in
+*-musl)
+ # The buildsystem assumes iconv is in libc
+ export LIBS="-liconv"
+ ;;
+esac &&
+
+default_build
diff --git a/ftp/transmission-i2p/CONFIGURE b/ftp/transmission-i2p/CONFIGURE
new file mode 100755
index 0000000000..537a450dbf
--- /dev/null
+++ b/ftp/transmission-i2p/CONFIGURE
@@ -0,0 +1,15 @@
+config_query_option TRANSMISSION_I2P_OPTS "Build command-line client?" y \
+ "--enable-cli" \
+ "--disable-cli" &&
+
+config_query_option TRANSMISSION_I2P_OPTS "Build daemon?" y \
+ "--enable-daemon" \
+ "--disable-daemon" &&
+
+config_query_option TRANSMISSION_I2P_OPTS "Build µTP support?" n \
+ "--enable-utp" \
+ "--disable-utp" &&
+
+config_query_option TRANSMISSION_I2P_OPTS "Optimize libtransmission for low-resource systems?" n \
+ "--enable-lightweight" \
+ "--disable-lightweight"
diff --git a/ftp/transmission-i2p/DEPENDS b/ftp/transmission-i2p/DEPENDS
new file mode 100755
index 0000000000..a83a440360
--- /dev/null
+++ b/ftp/transmission-i2p/DEPENDS
@@ -0,0 +1,34 @@
+. "$GRIMOIRE/FUNCTIONS" &&
+
+depends SSL &&
+depends intltool &&
+depends curl &&
+depends libevent &&
+
+if spell_ok libevent && is_version_less $(installed_version libevent) 2.0.10; then
+ force_depends libevent
+fi &&
+
+runtime_depends zlib &&
+
+optional_depends gtk+3 \
+ "--with-gtk" \
+ "--without-gtk" \
+ "for GTK+ client" &&
+
+if is_depends_enabled $SPELL gtk+3; then
+ depends GETTEXT '--enable-nls' &&
+
+ optional_depends libcanberra "" "" "for sounds support" &&
+ optional_depends dbus-glib "" "" "for dbus support"
+else
+ optional_depends GETTEXT \
+ "--enable-nls" \
+ "--disable-nls" \
+ "for native language support"
+fi &&
+
+optional_depends libnatpmp \
+ "--enable-external-natpmp" \
+ "--disable-external-natpmp" \
+ "to use system natpmp"
diff --git a/ftp/transmission-i2p/DETAILS b/ftp/transmission-i2p/DETAILS
new file mode 100755
index 0000000000..cf4ecf8be7
--- /dev/null
+++ b/ftp/transmission-i2p/DETAILS
@@ -0,0 +1,15 @@
+. "$GRIMOIRE"/FUNCTIONS
+ SPELL=transmission-i2p
+ VERSION=$(get_scm_version)
+ FORCE_DOWNLOAD=on
+ SOURCE_IGNORE=volatile
+ SOURCE=$SPELL-git.tar.xz
+ SOURCE_URL[0]=git://github.com/l-n-s/${SPELL}.git:${SPELL}-git
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-git
+ WEB_SITE=https://github.com/l-n-s/transmission-i2p
+ LICENSE[0]=MIT
+ ENTERED=20211004
+ SHORT="Anonymous torrent client Transmission-I2P"
+cat << EOF
+Anonymous torrent client powered by Invisible Internet.
+EOF
diff --git a/ftp/transmission-i2p/HISTORY b/ftp/transmission-i2p/HISTORY
new file mode 100644
index 0000000000..93bfdce932
--- /dev/null
+++ b/ftp/transmission-i2p/HISTORY
@@ -0,0 +1,4 @@
+2021-10-04 Pavel Vinogradov <public@sourcemage.org>
+ * BUILD, CONFIGURE, DEPENDS, DETAILS, PRE_BUILD, PREPARE, patches/package_name.patch,
+ patches/platform-quota.patch: created
+
diff --git a/ftp/transmission-i2p/PREPARE b/ftp/transmission-i2p/PREPARE
new file mode 100755
index 0000000000..7e2d26b128
--- /dev/null
+++ b/ftp/transmission-i2p/PREPARE
@@ -0,0 +1,2 @@
+. "$GRIMOIRE"/FUNCTIONS &&
+prepare_select_branch scm
diff --git a/ftp/transmission-i2p/PRE_BUILD b/ftp/transmission-i2p/PRE_BUILD
new file mode 100755
index 0000000000..0ec8ad8845
--- /dev/null
+++ b/ftp/transmission-i2p/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&
+
+apply_patch_dir patches
diff --git a/ftp/transmission-i2p/patches/package_name.patch b/ftp/transmission-i2p/patches/package_name.patch
new file mode 100644
index 0000000000..66ca943fb7
--- /dev/null
+++ b/ftp/transmission-i2p/patches/package_name.patch
@@ -0,0 +1,31 @@
+diff --git a/configure b/configure
+index 5b0bf69..a0f07e9 100755
+--- a/configure
++++ b/configure
+@@ -568,10 +568,10 @@ MFLAGS=
+ MAKEFLAGS=
+
+ # Identity of this package.
+-PACKAGE_NAME='transmission'
+-PACKAGE_TARNAME='transmission'
++PACKAGE_NAME='transmission-i2p'
++PACKAGE_TARNAME='transmission-i2p'
+ PACKAGE_VERSION='2.82'
+-PACKAGE_STRING='transmission 2.82'
++PACKAGE_STRING='transmission-i2p 2.82'
+ PACKAGE_BUGREPORT='http://trac.transmissionbt.com/newticket'
+ PACKAGE_URL=''
+
+diff --git a/libtransmission/platform.c b/libtransmission/platform.c
+index 59c8d5e..4a4cd6e 100644
+--- a/libtransmission/platform.c
++++ b/libtransmission/platform.c
+@@ -547,7 +547,7 @@ tr_getWebClientDir (const tr_session * session UNUSED)
+ /* walk through the candidates & look for a match */
+ for (l=candidates; l; l=l->next)
+ {
+- char * path = tr_buildPath (l->data, "transmission", "web", NULL);
++ char * path = tr_buildPath (l->data, "transmission-i2p", "web", NULL);
+ const int found = isWebClientDir (path);
+ if (found)
+ {
diff --git a/ftp/transmission-i2p/patches/platform-quota.patch b/ftp/transmission-i2p/patches/platform-quota.patch
new file mode 100644
index 0000000000..f449310c36
--- /dev/null
+++ b/ftp/transmission-i2p/patches/platform-quota.patch
@@ -0,0 +1,13 @@
+diff --git a/libtransmission/platform-quota.c b/libtransmission/platform-quota.c
+index 1b8a33b..efdccb0 100644
+--- a/libtransmission/platform-quota.c
++++ b/libtransmission/platform-quota.c
+@@ -241,7 +241,7 @@ getquota (const char * device)
+ spaceused = (int64_t) dq.dqb_curbytes;
+ #elif defined(__UCLIBC__)
+ spaceused = (int64_t) btodb(dq.dqb_curblocks);
+-#elif defined(__sun) || (_LINUX_QUOTA_VERSION < 2)
++#elif defined(__sun) || (defined(_LINUX_QUOTA_VERSION) && _LINUX_QUOTA_VERSION < 2)
+ spaceused = (int64_t) dq.dqb_curblocks >> 1;
+ #else
+ spaceused = btodb(dq.dqb_curspace);