Code highlighting

Mike Gelfand 2016-09-03 00:34:42 +03:00
parent 09d04659eb
commit 3095b48f27
1 changed files with 54 additions and 32 deletions

@ -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:
$ svn co svn://svn.transmissionbt.com/Transmission/trunk Transmission
```console
$ svn co svn://svn.transmissionbt.com/Transmission/trunk Transmission
```
## 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:
$ 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)._
@ -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.
# 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
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
$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz
$ tar xzf libevent-2.0.18-stable.tar.gz
$ cd libevent-2.0.18-stable
$ CFLAGS="-Os -march=native" ./configure && make
```console
$ cd /var/tmp
$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz
$ tar xzf libevent-2.0.18-stable.tar.gz
$ 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.
# checkinstall
```console
# checkinstall
```
3. Transmission
Now we need to prepare Transmission for compilation by configuring the source, the same as with libevent.
$ cd /var/tmp
$ wget http://download-origin.transmissionbt.com/files/transmission-2.51.tar.bz2
$ tar xjf transmission-2.51.tar.bz2
$ cd transmission-2.51
# CFLAGS="-Os -march=native" ./configure && make && checkinstall
```console
$ cd /var/tmp
$ wget http://download-origin.transmissionbt.com/files/transmission-2.51.tar.bz2
$ tar xjf transmission-2.51.tar.bz2
$ 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._
@ -88,7 +100,9 @@ The packages you need are:
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`:
* [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:
$ 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)._
@ -126,30 +142,36 @@ _You'll also need to install the corresponding `-devel` packages._
### Building from a tarball ###
$ tar xvjf transmission-1.76.tar.bz2
$ cd transmission-1.76
$ ./configure -q && make -s
$ su (if necessary for the next line)
$ make install
```console
$ tar xvjf transmission-1.76.tar.bz2
$ cd transmission-1.76
$ ./configure -q && make -s
$ su # if necessary for the next line
$ make install
```
### Building from an SVN snapshot ###
#### First Time ####
$ svn co svn://svn.transmissionbt.com/Transmission/trunk Transmission
$ cd Transmission
$ ./autogen.sh && make -s
$ su (if necessary for the next line)
$ make install
```console
$ svn co svn://svn.transmissionbt.com/Transmission/trunk Transmission
$ cd Transmission
$ ./autogen.sh && make -s
$ su # if necessary for the next line
$ make install
```
#### Updating ####
$ cd Transmission
$ make clean
$ svn up
$ make -s
$ su (if necessary for the next line)
$ make install
```console
$ cd Transmission
$ make clean
$ svn up
$ make -s
$ su # if necessary for the next line
$ make install
```
## On Windows ##