Get the source
Download the src.rpm file and unpack it. I am using mc to navigate into src.rpm and copy all files from there to /home/to_build/src/ktorrent folder.
Diff to change user-agent
You can add diff to any spec file to apply it before build. It is much better than modify and pack sources back. So, here is my diff to change KTorrent 3.1 User-Agent string from "KTorrent + version" to plain "KTorrent". Now just save it in same folder ("/home/to_build/src/ktorrent" for me).
Modify spec file
Now only few modifications to spec file and time to start building:
Add this lines:
Patch10: user-agent.diff
%patch10
It is easy enough to find where to insert it, there are already few patches applyed.
And now, to enable blocked by SUSE trackers, comment this two lines:
#Patch2: remove-links.diff
#%patch2
Now just build and use your favourite torrent-client with your favourite tracker!
2 comments:
Just alter some constants in /usr/src/packages/BUILD/ktorrent-3.1.3/libktcore/ktversion.h und it will work without the patch you provided.
How about filing a whish to bugs.kde.org for configuring the USER_AGENT during runtime? Maybe even configurable per tracker...
I am using build command to rebuild my RPMs. It helps me keep my system clean. I am not really installing src.rpm package to the system to build it, just build from spec file.
Post a Comment