* [Buildroot] transmission 1.74 fails to build
@ 2010-04-16 7:14 Belisko Marek
2010-04-16 14:42 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Belisko Marek @ 2010-04-16 7:14 UTC (permalink / raw)
To: buildroot
Hi,
during playing with transmission package get following error:
checking pkg-config is at least version 0.9.0... ./configure: line
17710: /home/open-nandra/projects/buildroot/output/host/usr/bin/pkg-config:
No such file or directory
no
checking for OPENSSL... checking for OpenSSL... /usr
checking for LIBCURL... configure: error: in
`/home/open-nandra/projects/buildroot/output/build/transmission-1.74':
configure: error: The pkg-config script could not be found or is too
old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables LIBCURL_CFLAGS
and LIBCURL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Toolachain is comiled by buildroot. Should I select another option in
toolchain compilation
to compile pkg-config?
Thanks in advance,
Marek
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] transmission 1.74 fails to build
2010-04-16 7:14 [Buildroot] transmission 1.74 fails to build Belisko Marek
@ 2010-04-16 14:42 ` Thomas Petazzoni
2010-04-16 16:37 ` Belisko Marek
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2010-04-16 14:42 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 16 Apr 2010 09:14:41 +0200
Belisko Marek <marek.belisko@gmail.com> wrote:
> during playing with transmission package get following error:
Unless I'm missing something, transmission is not packaged in Buildroot
official source tree, is it ?
> checking pkg-config is at least version 0.9.0... ./configure: line
> 17710: /home/open-nandra/projects/buildroot/output/host/usr/bin/pkg-config:
> No such file or directory
host-pkg-config must be added to the list of dependencies of
transmission in the .mk file. If you need details, could you share your
package .mk file ?
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] transmission 1.74 fails to build
2010-04-16 14:42 ` Thomas Petazzoni
@ 2010-04-16 16:37 ` Belisko Marek
2010-04-17 0:35 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Belisko Marek @ 2010-04-16 16:37 UTC (permalink / raw)
To: buildroot
Hi,
finally I can test. Thanks for suggestion and thanks for making buildroot.
I saw in bugzilla that transmission is postponed to 2010.5. Following patch
add transmission client to buildroot.
Based on work jasaw81 at yahoo.com.au which make initial support
for transmission (v. 1.74). Just added more dependencies used in newest
version ( v. 1.92). Compile tested only.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
package/Config.in | 2 +-
package/transmission/Config.in | 23 +++++++
package/transmission/settings.json.template | 52 ++++++++++++++
package/transmission/transmission-init | 88 ++++++++++++++++++++++++
package/transmission/transmission.mk | 96 +++++++++++++++++++++++++++
package/transmission/transmissionmkdir | 29 ++++++++
6 files changed, 289 insertions(+), 1 deletions(-)
create mode 100755 package/transmission/Config.in
create mode 100755 package/transmission/settings.json.template
create mode 100755 package/transmission/transmission-init
create mode 100755 package/transmission/transmission.mk
create mode 100755 package/transmission/transmissionmkdir
diff --git a/package/Config.in b/package/Config.in
index 6104903..b4def2f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -424,7 +424,7 @@ source "package/wget/Config.in"
endif
source "package/wireless-tools/Config.in"
source "package/wpa_supplicant/Config.in"
-
+source "package/transmission/Config.in"
endmenu
menu "Package managers"
diff --git a/package/transmission/Config.in b/package/transmission/Config.in
new file mode 100755
index 0000000..f42c79d
--- /dev/null
+++ b/package/transmission/Config.in
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_TRANSMISSION
+ bool "transmission"
+ select BR2_PACKAGE_ZLIB
+ select BR2_PACKAGE_OPENSSL
+ select BR2_PACKAGE_LIBCURL
+ select BR2_PACKAGE_LIBEVENT
+ default n
+ help
+ transmission - Transmission BitTorrent Client
+
+config BR2_PACKAGE_TRANSMISSION_CLI
+ bool "transmissioncli"
+ depends on BR2_PACKAGE_TRANSMISSION
+ default no
+ help
+ Install transmission command line interface.
+
+config BR2_PACKAGE_TRANSMISSION_REMOTE
+ bool "transmission-remote"
+ depends on BR2_PACKAGE_TRANSMISSION
+ default no
+ help
+ Install transmission remote management tool.
diff --git a/package/transmission/settings.json.template
b/package/transmission/settings.json.template
new file mode 100755
index 0000000..f21a853
--- /dev/null
+++ b/package/transmission/settings.json.template
@@ -0,0 +1,52 @@
+{
+ "alt-speed-down": 50,
+ "alt-speed-enabled": false,
+ "alt-speed-time-begin": 540,
+ "alt-speed-time-day": 127,
+ "alt-speed-time-enabled": false,
+ "alt-speed-time-end": 1020,
+ "alt-speed-up": 50,
+ "bind-address-ipv4": "0.0.0.0",
+ "bind-address-ipv6": "::",
+ "blocklist-enabled": false,
+ "dht-enabled": true,
+ "download-dir": "{DOWNLOAD_DIR}",
+ "watch-dir": "{WATCH_DIR}",
+ "watch-dir-enabled": false,
+ "encryption": 1,
+ "lazy-bitfield-enabled": true,
+ "message-level": 2,
+ "open-file-limit": 32,
+ "peer-limit-global": 240,
+ "peer-limit-per-torrent": 60,
+ "peer-port": 51413,
+ "peer-port-random-high": 65535,
+ "peer-port-random-low": 49152,
+ "peer-port-random-on-start": false,
+ "peer-socket-tos": 0,
+ "pex-enabled": true,
+ "port-forwarding-enabled": true,
+ "preallocation": 2,
+ "proxy": "",
+ "proxy-auth-enabled": false,
+ "proxy-auth-password": "",
+ "proxy-auth-username": "",
+ "proxy-enabled": false,
+ "proxy-port": 80,
+ "proxy-type": 0,
+ "ratio-limit": 2.0000,
+ "ratio-limit-enabled": false,
+ "rpc-authentication-required": false,
+ "rpc-bind-address": "0.0.0.0",
+ "rpc-enabled": true,
+ "rpc-password": "",
+ "rpc-port": 9091,
+ "rpc-username": "",
+ "rpc-whitelist": "127.0.0.1",
+ "rpc-whitelist-enabled": false,
+ "speed-limit-down": 100,
+ "speed-limit-down-enabled": false,
+ "speed-limit-up": 100,
+ "speed-limit-up-enabled": false,
+ "upload-slots-per-torrent": 14
+}
diff --git a/package/transmission/transmission-init
b/package/transmission/transmission-init
new file mode 100755
index 0000000..9c15aae
--- /dev/null
+++ b/package/transmission/transmission-init
@@ -0,0 +1,88 @@
+#!/bin/sh
+if [ ! -z "$2" ]; then
+ TRANSMISSION_ARGS="$2"
+else
+ TRANSMISSION_ARGS=""
+fi
+
+if [ ! -z "$3" ]; then
+ NET_INTERFACE="$3"
+else
+ NET_INTERFACE=""
+fi
+
+DESC="bittorrent client"
+NAME=transmission-daemon
+DAEMON=$(which $NAME)
+SCRIPTNAME=/etc/init.d/$0
+
+[ -x "$DAEMON" ] || exit 0
+
+do_start()
+{
+ if [ ! -z "$NET_INTERFACE" ]; then
+ # poll network interface
+ IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
+ IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet
addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
+ while [ -z "$IP_ADDR" ]
+ do
+ sleep 5
+ IFCONFIG_OUTPUT=`ifconfig $NET_INTERFACE`
+ IP_ADDR=`expr match "$IFCONFIG_OUTPUT" '.*inet
addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*'`
+ done
+ fi
+ if [ -z "$TRANSMISSION_ARGS" ]; then
+ start-stop-daemon -S -b -x ${DAEMON}
+ else
+ start-stop-daemon -S -b -x ${DAEMON} -- ${TRANSMISSION_ARGS}
+ fi
+ return $?
+}
+
+do_stop()
+{
+ start-stop-daemon -K -b -x ${DAEMON}
+ return $?
+}
+
+case "$1" in
+ start)
+ echo "Starting $DESC" "$NAME..."
+ do_start
+ case "$?" in
+ 0) echo " Start $DESC $NAME: SUCCESS" ;;
+ *)
+ echo " Start $DESC $NAME: FAILED"
+ exit 3
+ ;;
+ esac
+ ;;
+ stop)
+ echo "Stopping $DESC $NAME..."
+ do_stop
+ case "$?" in
+ 0) echo " Stop $DESC $NAME: SUCCESS" ;;
+ *)
+ echo " Stop $DESC $NAME: FAILED"
+ exit 3
+ ;;
+ esac
+ ;;
+ restart|force-reload)
+ echo "Restarting $DESC $NAME..."
+ do_stop
+ sleep 2
+ do_start
+ case "$?" in
+ 0) echo " Restart $DESC $NAME: SUCCESS" ;;
+ *)
+ echo " Restart $DESC $NAME: FAILED: couldn't start $NAME"
+ exit 3
+ ;;
+ esac
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
diff --git a/package/transmission/transmission.mk
b/package/transmission/transmission.mk
new file mode 100755
index 0000000..930c2aa
--- /dev/null
+++ b/package/transmission/transmission.mk
@@ -0,0 +1,96 @@
+#############################################################
+#
+# transmission
+#
+#############################################################
+TRANSMISSION_VERSION:=1.92
+TRANSMISSION_SOURCE:=transmission-$(TRANSMISSION_VERSION).tar.bz2
+TRANSMISSION_SITE:=http://mirrors.m0k.org/transmission/files/
+TRANSMISSION_DIR:=$(BUILD_DIR)/transmission-$(TRANSMISSION_VERSION)
+TRANSMISSION_CAT:=$(BZCAT)
+TRANSMISSION_BINARY:=daemon/transmission-daemon
+TRANSMISSION_TARGET_BINARY:=usr/sbin/transmission-daemon
+
+$(DL_DIR)/$(TRANSMISSION_SOURCE):
+ $(call DOWNLOAD,$(TRANSMISSION_SITE),$(TRANSMISSION_SOURCE))
+
+$(TRANSMISSION_DIR)/.unpacked: $(DL_DIR)/$(TRANSMISSION_SOURCE)
+ $(TRANSMISSION_CAT) $(DL_DIR)/$(TRANSMISSION_SOURCE) | tar -C
$(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh `dirname $(TRANSMISSION_DIR)`
package/transmission \*.patch
+ $(CONFIG_UPDATE) $(TRANSMISSION_DIR)
+ touch $@
+
+$(TRANSMISSION_DIR)/.configured: $(TRANSMISSION_DIR)/.unpacked
+ (cd $(TRANSMISSION_DIR); rm -rf config.cache; \
+ ./autogen.sh; \
+ $(TARGET_CONFIGURE_OPTS) \
+ $(TARGET_CONFIGURE_ARGS) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --localstatedir=/var \
+ --disable-gtk \
+ --disable-libnotify \
+ --enable-cli \
+ --enable-daemon \
+ --with-zlib=$(STAGING_DIR) \
+ $(DISABLE_NLS) \
+ $(DISABLE_LARGEFILE) \
+ )
+ touch $@
+
+$(TRANSMISSION_DIR)/$(TRANSMISSION_BINARY): $(TRANSMISSION_DIR)/.configured
+ $(MAKE) -C $(TRANSMISSION_DIR)
+
+TRANSMISSION_TARGETS_ :=
+TRANSMISSION_TARGETS_y :=
+
+TRANSMISSION_TARGETS_$(BR2_PACKAGE_TRANSMISSION_REMOTE) +=
usr/sbin/transmission-remote
+TRANSMISSION_TARGETS_$(BR2_PACKAGE_TRANSMISSION_CLI) +=
usr/sbin/transmissioncli
+
+$(TARGET_DIR)/$(TRANSMISSION_TARGET_BINARY):
$(TRANSMISSION_DIR)/$(TRANSMISSION_BINARY)
+ mkdir -p $(TARGET_DIR)/usr/sbin
+ mkdir -p $(TARGET_DIR)/usr/share/transmission/web
+ mkdir -p $(TARGET_DIR)/etc/init.d
+ mkdir -p $(TARGET_DIR)/etc/transmission
+ cp -f $(TRANSMISSION_DIR)/$(TRANSMISSION_BINARY)
$(TARGET_DIR)/$(TRANSMISSION_TARGET_BINARY)
+ rsync -r --exclude=.svn $(TRANSMISSION_DIR)/web/
$(TARGET_DIR)/usr/share/transmission/web
+ $(INSTALL) -m 0755 package/transmission/transmission-init
$(TARGET_DIR)/etc/init.d/transmission-init
+ $(INSTALL) -m 0755 package/transmission/transmissionmkdir
$(TARGET_DIR)/usr/sbin/transmissionmkdir
+ $(INSTALL) -m 0755 -D package/transmission/settings.json.template
$(TARGET_DIR)/etc/transmission/settings.json.template
+ifeq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y)
+ cp -f $(TRANSMISSION_DIR)/daemon/transmission-remote
$(TARGET_DIR)/usr/sbin/transmission-remote
+endif
+ifeq ($(BR2_PACKAGE_TRANSMISSION_CLI),y)
+ cp -f $(TRANSMISSION_DIR)/cli/transmissioncli
$(TARGET_DIR)/usr/sbin/transmissioncli
+endif
+
+transmission:host-pkg-config host-intltool uclibc zlib openssl
libcurl libevent $(TARGET_DIR)/$(TRANSMISSION_TARGET_BINARY)
+
+transmission-source: $(DL_DIR)/$(TRANSMISSION_SOURCE)
+
+transmission-unpacked: $(TRANSMISSION_DIR)/.unpacked
+
+transmission-clean:
+ rm -f $(TARGET_DIR)/$(TRANSMISSION_TARGET_BINARY)
+ for file in $(TRANSMISSION_TARGETS_y); do \
+ rm -f $(TARGET_DIR)/$$file; \
+ done
+ rm -f $(TARGET_DIR)/etc/init.d/transmission-init
+ rm -f $(TARGET_DIR)/usr/sbin/transmissionmkdir
+ rm -rf $(TARGET_DIR)/etc/transmission
+ rm -rf $(TARGET_DIR)/usr/share/transmission/web
+ -$(MAKE) -C $(TRANSMISSION_DIR) clean
+
+transmission-dirclean:
+ rm -rf $(TRANSMISSION_DIR)
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_PACKAGE_TRANSMISSION),y)
+TARGETS+=transmission
+endif
diff --git a/package/transmission/transmissionmkdir
b/package/transmission/transmissionmkdir
new file mode 100755
index 0000000..df67f92
--- /dev/null
+++ b/package/transmission/transmissionmkdir
@@ -0,0 +1,29 @@
+#!/bin/sh
+[ -z "$1" ] && echo "Error: Directory to be made Transmission home
path must be specified" && exit 1
+[ ! -e "$1" ] && echo "Error: Directory does not exist" && exit 1
+[ ! -d "$1" ] && echo "Error: $1 is not a directory" && exit 1
+
+CONFIG_FILENAME="settings.json"
+TEMPLATE_FILEPATH="/etc/transmission"
+BLOCKLISTS_DIR="${1}/blocklists"
+RESUME_DIR="${1}/resume"
+TORRENTS_DIR="${1}/torrents"
+DOWNLOADS_DIR="${1}/downloads"
+WATCH_DIR="${1}/watch_torrents"
+
+mkdir -p ${DOWNLOADS_DIR}
+[ $? -ne 0 ] && echo "ERROR: Unable to create directory
${DOWNLOADS_DIR}" && exit 1
+mkdir -p ${WATCH_DIR}
+[ $? -ne 0 ] && echo "ERROR: Unable to create directory ${WATCH_DIR}" && exit 1
+mkdir -p ${TORRENTS_DIR}
+[ $? -ne 0 ] && echo "ERROR: Unable to create directory
${TORRENTS_DIR}" && exit 1
+mkdir -p ${RESUME_DIR}
+[ $? -ne 0 ] && echo "ERROR: Unable to create directory
${RESUME_DIR}" && exit 1
+mkdir -p ${BLOCKLISTS_DIR}
+[ $? -ne 0 ] && echo "ERROR: Unable to create directory
${BLOCKLISTS_DIR}" && exit 1
+
+sed \
+-e "s,{DOWNLOAD_DIR},"${DOWNLOADS_DIR}",g" \
+-e "s,{WATCH_DIR},"${WATCH_DIR}",g" \
+< ${TEMPLATE_FILEPATH}/${CONFIG_FILENAME}.template \
+> ${1}/${CONFIG_FILENAME}
--
1.6.4.2
On Fri, Apr 16, 2010 at 4:42 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Fri, 16 Apr 2010 09:14:41 +0200
> Belisko Marek <marek.belisko@gmail.com> wrote:
>
>> during playing with transmission package get following error:
>
> Unless I'm missing something, transmission is not packaged in Buildroot
> official source tree, is it ?
>
>> checking pkg-config is at least version 0.9.0... ./configure: line
>> 17710: /home/open-nandra/projects/buildroot/output/host/usr/bin/pkg-config:
>> No such file or directory
>
> host-pkg-config must be added to the list of dependencies of
> transmission in the .mk file. If you need details, could you share your
> package .mk file ?
>
> Regards,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] transmission 1.74 fails to build
2010-04-16 16:37 ` Belisko Marek
@ 2010-04-17 0:35 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2010-04-17 0:35 UTC (permalink / raw)
To: buildroot
Hello Marek,
Thanks for working on this package!
On Fri, 16 Apr 2010 18:37:21 +0200
Belisko Marek <marek.belisko@gmail.com> wrote:
> --- /dev/null
> +++ b/package/transmission/Config.in
> @@ -0,0 +1,23 @@
> +config BR2_PACKAGE_TRANSMISSION
> + bool "transmission"
> + select BR2_PACKAGE_ZLIB
> + select BR2_PACKAGE_OPENSSL
> + select BR2_PACKAGE_LIBCURL
> + select BR2_PACKAGE_LIBEVENT
> + default n
default n is not needed, this is the default.
> diff --git a/package/transmission/settings.json.template
> b/package/transmission/settings.json.template
What is this ? Why isn't it part of the Transmission package itself ?
> diff --git a/package/transmission/transmission-init
> b/package/transmission/transmission-init
It should probably be named Sxxtransmission, just like all the other
init scripts.
> diff --git a/package/transmission/transmission.mk
> b/package/transmission/transmission.mk
Since transmission is using the autotools as its build system, you must
use the autotools infrastructure for the .mk file. See
http://buildroot.org/downloads/buildroot.html#autotools-tutorial for
details.
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-17 0:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-16 7:14 [Buildroot] transmission 1.74 fails to build Belisko Marek
2010-04-16 14:42 ` Thomas Petazzoni
2010-04-16 16:37 ` Belisko Marek
2010-04-17 0:35 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox