1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-03 05:25:52 +00:00

Code highlighting

Mike Gelfand 2016-09-03 00:34:42 +03:00
parent 09d04659eb
commit 3095b48f27

@ -12,7 +12,9 @@ Automated source code tarballs including the newest code [are now available, too
If you want to check out the source code yourself from svn, open a terminal window and type: If you want to check out the source code yourself from svn, open a terminal window and type:
$ svn co svn://svn.transmissionbt.com/Transmission/trunk Transmission ```console
$ svn co svn://svn.transmissionbt.com/Transmission/trunk Transmission
```
## On Mac OS X ## ## On Mac OS X ##
@ -34,7 +36,9 @@ If building from source is too daunting for you, check out the [nightly builds](
On Ubuntu, you can install the required development tools with this command: On Ubuntu, you can install the required development tools with this command:
$ sudo apt-get install build-essential automake autoconf libtool pkg-config intltool libcurl4-openssl-dev libglib2.0-dev libevent-dev libminiupnpc-dev libminiupnpc5 libappindicator-dev ```console
$ sudo apt-get install build-essential automake autoconf libtool pkg-config intltool libcurl4-openssl-dev libglib2.0-dev libevent-dev libminiupnpc-dev libminiupnpc5 libappindicator-dev
```
_After you install those you can skip [to this section](#building-from-a-tarball)._ _After you install those you can skip [to this section](#building-from-a-tarball)._
@ -46,31 +50,39 @@ Sometimes you have a need to stay current with upstream releases, even though yo
First let us install every dependency Transmission needs and for which there is a usable version in the Debian repository. First let us install every dependency Transmission needs and for which there is a usable version in the Debian repository.
# apt-get install ca-certificates libcurl4-openssl-dev libssl-dev pkg-config build-essential checkinstall ```console
# apt-get install ca-certificates libcurl4-openssl-dev libssl-dev pkg-config build-essential checkinstall
```
2. libevent 2. libevent
Traditionally, libevent is also needed, but Transmission depends on version numbers only rarely found in Debian. So let us start by compiling libevent in a directory of your choice. Browse to http://libevent.org/ and get the latest version. Traditionally, libevent is also needed, but Transmission depends on version numbers only rarely found in Debian. So let us start by compiling libevent in a directory of your choice. Browse to http://libevent.org/ and get the latest version.
$ cd /var/tmp ```console
$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz $ cd /var/tmp
$ tar xzf libevent-2.0.18-stable.tar.gz $ wget https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz
$ cd libevent-2.0.18-stable $ tar xzf libevent-2.0.18-stable.tar.gz
$ CFLAGS="-Os -march=native" ./configure && make $ cd libevent-2.0.18-stable
$ CFLAGS="-Os -march=native" ./configure && make
```
Now, we would really like to be able to upgrade to a new version in the future, so there should be a mechanism other than the classic "make install" which keeps count of what went where (and ideally this is not a piece of paper). So we build a very simple Debian package from the compiled files and install it. Basically you just enter the following command and hit return until a nice text message tells you that all is done. Now, we would really like to be able to upgrade to a new version in the future, so there should be a mechanism other than the classic "make install" which keeps count of what went where (and ideally this is not a piece of paper). So we build a very simple Debian package from the compiled files and install it. Basically you just enter the following command and hit return until a nice text message tells you that all is done.
# checkinstall ```console
# checkinstall
```
3. Transmission 3. Transmission
Now we need to prepare Transmission for compilation by configuring the source, the same as with libevent. Now we need to prepare Transmission for compilation by configuring the source, the same as with libevent.
$ cd /var/tmp ```console
$ wget http://download-origin.transmissionbt.com/files/transmission-2.51.tar.bz2 $ cd /var/tmp
$ tar xjf transmission-2.51.tar.bz2 $ wget http://download-origin.transmissionbt.com/files/transmission-2.51.tar.bz2
$ cd transmission-2.51 $ tar xjf transmission-2.51.tar.bz2
# CFLAGS="-Os -march=native" ./configure && make && checkinstall $ cd transmission-2.51
# CFLAGS="-Os -march=native" ./configure && make && checkinstall
```
_Thanks to josen at http://falkhusemann.de/blog/2012/05/compiling-transmission-bittorrent-for-debiand/ for the original Debian Squeeze howto section._ _Thanks to josen at http://falkhusemann.de/blog/2012/05/compiling-transmission-bittorrent-for-debiand/ for the original Debian Squeeze howto section._
@ -88,7 +100,9 @@ The packages you need are:
Or simply run the following command: Or simply run the following command:
$ yum install gcc gcc-c++ m4 make automake libtool gettext openssl-devel ```console
$ yum install gcc gcc-c++ m4 make automake libtool gettext openssl-devel
```
However, Transmission needs other packages unavailable in `yum`: However, Transmission needs other packages unavailable in `yum`:
* [pkg-config](http://pkg-config.freedesktop.org/wiki/) * [pkg-config](http://pkg-config.freedesktop.org/wiki/)
@ -97,7 +111,9 @@ However, Transmission needs other packages unavailable in `yum`:
Before building Transmission, you need to set the pkgconfig environment setting: Before building Transmission, you need to set the pkgconfig environment setting:
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ```console
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
```
_After you install those you can skip [to this section](#building-from-a-tarball)._ _After you install those you can skip [to this section](#building-from-a-tarball)._
@ -126,30 +142,36 @@ _You'll also need to install the corresponding `-devel` packages._
### Building from a tarball ### ### Building from a tarball ###
$ tar xvjf transmission-1.76.tar.bz2 ```console
$ cd transmission-1.76 $ tar xvjf transmission-1.76.tar.bz2
$ ./configure -q && make -s $ cd transmission-1.76
$ su (if necessary for the next line) $ ./configure -q && make -s
$ make install $ su # if necessary for the next line
$ make install
```
### Building from an SVN snapshot ### ### Building from an SVN snapshot ###
#### First Time #### #### First Time ####
$ svn co svn://svn.transmissionbt.com/Transmission/trunk Transmission ```console
$ cd Transmission $ svn co svn://svn.transmissionbt.com/Transmission/trunk Transmission
$ ./autogen.sh && make -s $ cd Transmission
$ su (if necessary for the next line) $ ./autogen.sh && make -s
$ make install $ su # if necessary for the next line
$ make install
```
#### Updating #### #### Updating ####
$ cd Transmission ```console
$ make clean $ cd Transmission
$ svn up $ make clean
$ make -s $ svn up
$ su (if necessary for the next line) $ make -s
$ make install $ su # if necessary for the next line
$ make install
```
## On Windows ## ## On Windows ##