Line 0
Link Here
|
|
|
1 |
# Created by: Rozhuk Ivan <rozhuk.im@gmail.com> |
2 |
# $FreeBSD$ |
3 |
|
4 |
PORTNAME= rutorrent |
5 |
PORTVERSION= 3.10 |
6 |
DISTVERSIONPREFIX=v |
7 |
DISTVERSIONSUFFIX=-beta |
8 |
CATEGORIES= www |
9 |
|
10 |
MAINTAINER= ports@FreeBSD.org |
11 |
COMMENT= ruTorrent is a web front-end for the Bittorrent client rtorrent. |
12 |
|
13 |
LICENSE= GPLv3 |
14 |
LICENSE_FILE= ${WRKSRC}/LICENSE.md |
15 |
|
16 |
USES= php |
17 |
|
18 |
NO_BUILD= yes |
19 |
NO_ARCH= yes |
20 |
USE_GITHUB= yes |
21 |
PORTEXAMPLES= rutorent.conf |
22 |
SUB_FILES= pkg-message |
23 |
GH_ACCOUNT= Novik |
24 |
GH_PROJECT= ruTorrent |
25 |
|
26 |
OPTIONS_DEFINE= EXAMPLES |
27 |
OPTIONS_GROUP= PLUGINS 3RDPARTY |
28 |
OPTIONS_GROUP_PLUGINS= AUTOTOOLS CHECKPORT CHUNKS COOKIES CPULOAD \ |
29 |
CREATE DATA DATADIR DISKSPACE EDIT ERASEDATA EXTSEARCH \ |
30 |
FEEDS FILEDROP GEOIP HISTORY HTTPRPC IPAD \ |
31 |
LOGINMGR LOOKAT MEDIAINFO RATIO RETRACKERS RPC RSS \ |
32 |
RUTRKCHK SCHEDULER SCREENSHOTS SEEDINGTIME \ |
33 |
SWTORRENT SOURCE SPECTROGRAM THEME THROTTLE TRACKLBLS \ |
34 |
TRAFIC UNPACK UPLOADETA XMPP |
35 |
OPTIONS_GROUP_3RDPARTY= HOSTNAME MOBILE INSTANTSEARCH PAUSEWEBUI \ |
36 |
RATIOCOLOR |
37 |
OPTIONS_DEFAULT=CHUNKS CREATE DATADIR EDIT ERASEDATA HOSTNAME \ |
38 |
SCHEDULER SEEDINGTIME SOURCE TRACKLBLS TRAFIC |
39 |
OPTIONS_SUB= yes |
40 |
|
41 |
3RDPARTY_DESC= 3rd party plugins |
42 |
|
43 |
AUTOTOOLS_DESC= Provides some possibilities on automation |
44 |
AUTOTOOLS_DIRS= autotools |
45 |
|
46 |
CHECKPORT_DESC= Adds incoming port status indicator |
47 |
CHECKPORT_DIRS= check_port |
48 |
|
49 |
CHUNKS_DESC= Shows the download status of torrent chunks |
50 |
CHUNKS_DIRS= chunks |
51 |
|
52 |
COOKIES_DESC= Use cookies for client authentication on trackers |
53 |
COOKIES_DIRS= cookies |
54 |
|
55 |
CPULOAD_DESC= Adds a CPU Load usage bar to the bottom toolbar |
56 |
CPULOAD_DIRS= cpuload |
57 |
|
58 |
CREATE_DESC= Allows for the creation of new .torrent files |
59 |
CREATE_DIRS= create |
60 |
|
61 |
DATA_DESC= Adds the "Get File" item to the right click menu |
62 |
DATA_DIRS= data |
63 |
|
64 |
DATADIR_DESC= Replacement of the cur torrent data dir |
65 |
DATADIR_DIRS= datadir |
66 |
|
67 |
DISKSPACE_DESC= Adds an easy to read disk meter |
68 |
DISKSPACE_DIRS= diskspace |
69 |
|
70 |
EDIT_DESC= Edit list of trackers and comment of the torrent |
71 |
EDIT_DIRS= edit |
72 |
|
73 |
ERASEDATA_DESC= Allows to delete data via context menu |
74 |
ERASEDATA_DIRS= erasedata |
75 |
|
76 |
EXTSEARCH_DESC= Allows to search many popular torrent sites |
77 |
EXTSEARCH_DIRS= extsearch |
78 |
|
79 |
FEEDS_DESC= Making RSS feeds with information of torrents |
80 |
FEEDS_DIRS= feeds |
81 |
|
82 |
FILEDROP_DESC= Allows to drag multiple torrents to the browser |
83 |
FILEDROP_DIRS= filedrop |
84 |
|
85 |
GEOIP_DESC= Shows geolocation of peers for the selected torrent |
86 |
GEOIP_DIRS= geoip |
87 |
|
88 |
HISTORY_DESC= Log a history of torrents |
89 |
HISTORY_DIRS= history |
90 |
|
91 |
HTTPRPC_DESC= Replacement for the mod_scgi webserver module |
92 |
HTTPRPC_DIRS= httprpc |
93 |
|
94 |
IPAD_DESC= Use scrolling and right-click mouse button |
95 |
IPAD_DIRS= ipad |
96 |
|
97 |
LOGINMGR_DESC= Used to login to 3rd party torrent sites |
98 |
LOGINMGR_DIRS= loginmgr |
99 |
|
100 |
LOOKAT_DESC= Search for torrent name in external sources |
101 |
LOOKAT_DIRS= lookat |
102 |
|
103 |
MEDIAINFO_DESC= Display media file information |
104 |
MEDIAINFO_DIRS= mediainfo |
105 |
MEDIAINFO_RUN_DEPENDS= mediainfo:multimedia/mediainfo |
106 |
|
107 |
RATIO_DESC= Set ratio limits for groups of torrents |
108 |
RATIO_DIRS= extratio ratio |
109 |
|
110 |
RETRACKERS_DESC=Add specified trackers to newly added torrents |
111 |
RETRACKERS_DIRS=retrackers |
112 |
|
113 |
RPC_DESC= Replacement for the mod_scgi webserver module |
114 |
RPC_DIRS= rpc |
115 |
|
116 |
RSS_DESC= Fetch torrents via rss download links |
117 |
RSS_DIRS= rss rssurlrewrite |
118 |
|
119 |
RUTRKCHK_DESC= Checks the rutracker.org for changed torrents |
120 |
RUTRKCHK_DIRS= rutracker_check |
121 |
|
122 |
SCHEDULER_DESC= Scheduler to control limits |
123 |
SCHEDULER_DIRS= scheduler |
124 |
|
125 |
SCREENSHOTS_DESC= Show screenshots from video |
126 |
SCREENSHOTS_DIRS= screenshots |
127 |
SCREENSHOTS_RUN_DEPENDS=ffmpeg:multimedia/ffmpeg |
128 |
|
129 |
SEEDINGTIME_DESC=Adds the columns 'Finished' and 'Added' |
130 |
SEEDINGTIME_DIRS=seedingtime |
131 |
|
132 |
SWTORRENT_DESC= Show peers like wTorrent |
133 |
SWTORRENT_DIRS= show_peers_like_wtorrent |
134 |
|
135 |
SOURCE_DESC= Adds a "Get .torrent" to the click context menu |
136 |
SOURCE_DIRS= source |
137 |
|
138 |
SPECTROGRAM_DESC= Show spectrogram of audio files |
139 |
SPECTROGRAM_DIRS= spectrogram |
140 |
SPECTROGRAM_RUN_DEPENDS=sox:audio/sox |
141 |
|
142 |
THEME_DESC= Allows change gui theme |
143 |
THEME_DIRS= theme |
144 |
|
145 |
THROTTLE_DESC= Set limits of speed for groups of torrents |
146 |
THROTTLE_DIRS= throttle |
147 |
|
148 |
TRACKLBLS_DESC= Adds a set of labels on the category panel |
149 |
TRACKLBLS_DIRS= tracklabels |
150 |
|
151 |
TRAFIC_DESC= Subsystem for monitoring rtorrent traffic totals |
152 |
TRAFIC_DIRS= trafic |
153 |
|
154 |
UNPACK_DESC= unrar/unzip torrent data |
155 |
UNPACK_DIRS= unpack |
156 |
UNPACK_RUN_DEPENDS= unrar:archivers/unrar |
157 |
|
158 |
UPLOADETA_DESC= Add upload target and ETA columns |
159 |
UPLOADETA_DIRS= uploadeta |
160 |
|
161 |
XMPP_DESC= Send notification via xmpp about finished downloads |
162 |
XMPP_DIRS= xmpp |
163 |
|
164 |
HOSTNAME_DESC= Add hostname column to peers tab |
165 |
HOSTNAME_DIRS= hostname |
166 |
HOSTNAME_GH_ACCOUNT= rozhuk-im:plugin_hostname |
167 |
HOSTNAME_GH_PROJECT= rutorrent-hostname:plugin_hostname |
168 |
HOSTNAME_GH_TAGNAME= 3ea65a6934144c403d534ba1bc86c57263686c6e:plugin_hostname |
169 |
|
170 |
INSTANTSEARCH_DESC= Searchresults appears instantly |
171 |
INSTANTSEARCH_DIRS= instantsearch |
172 |
INSTANTSEARCH_GH_ACCOUNT=Gyran:plugin_instantsearch |
173 |
INSTANTSEARCH_GH_PROJECT=rutorrent-instantsearch:plugin_instantsearch |
174 |
INSTANTSEARCH_GH_TAGNAME=d1bc52d6ef6547bc643312b5868c3662c7118a9b:plugin_instantsearch |
175 |
|
176 |
MOBILE_DESC= Mobile version of ruTorrent |
177 |
MOBILE_DIRS= mobile |
178 |
MOBILE_GH_ACCOUNT= xombiemp:plugin_mobile |
179 |
MOBILE_GH_PROJECT= rutorrentMobile:plugin_mobile |
180 |
MOBILE_GH_TAGNAME= 922fad1da149592084e0e3e7813828a49cac7bc3:plugin_mobile |
181 |
|
182 |
PAUSEWEBUI_DESC= Adds an button to pause the webui from updating |
183 |
PAUSEWEBUI_DIRS= pausewebui |
184 |
PAUSEWEBUI_GH_ACCOUNT= Gyran:plugin_pausewebui |
185 |
PAUSEWEBUI_GH_PROJECT= rutorrent-pausewebui:plugin_pausewebui |
186 |
PAUSEWEBUI_GH_TAGNAME= b398483f1e70c8e215ddbe34dfe3af3fc5f192ef:plugin_pausewebui |
187 |
|
188 |
RATIOCOLOR_DESC= Change color of ratio column depending on ratio |
189 |
RATIOCOLOR_DIRS= ratiocolor |
190 |
RATIOCOLOR_GH_ACCOUNT= Gyran:plugin_ratiocolor |
191 |
RATIOCOLOR_GH_PROJECT= rutorrent-ratiocolor:plugin_ratiocolor |
192 |
RATIOCOLOR_GH_TAGNAME= df181f25a7c957b300b2774352678b61f9d2aca3:plugin_ratiocolor |
193 |
|
194 |
.include <bsd.port.pre.mk> |
195 |
|
196 |
.if ${PORT_OPTIONS:MIPAD} && ${PORT_OPTIONS:MMOBILE} |
197 |
IGNORE= options IPAD and WebUI are incopatible |
198 |
.endif |
199 |
|
200 |
post-extract-HOSTNAME-on: |
201 |
@${MKDIR} ${WRKSRC}/plugins/hostname/ |
202 |
@${MV} ${WRKSRC_plugin_hostname}/* ${WRKSRC}/plugins/hostname/ |
203 |
|
204 |
post-extract-INSTANTSEARCH-on: |
205 |
@${MKDIR} ${WRKSRC}/plugins/instantsearch/ |
206 |
@${MV} ${WRKSRC_plugin_instantsearch}/* ${WRKSRC}/plugins/instantsearch/ |
207 |
|
208 |
post-extract-MOBILE-on: |
209 |
@${MKDIR} ${WRKSRC}/plugins/mobile/ |
210 |
@${MV} ${WRKSRC_plugin_mobile}/* ${WRKSRC}/plugins/mobile/ |
211 |
|
212 |
post-extract-PAUSEWEBUI-on: |
213 |
@${MKDIR} ${WRKSRC}/plugins/pausewebui/ |
214 |
@${MV} ${WRKSRC_plugin_pausewebui}/* ${WRKSRC}/plugins/pausewebui/ |
215 |
|
216 |
post-extract-RATIOCOLOR-on: |
217 |
@${MKDIR} ${WRKSRC}/plugins/ratiocolor/ |
218 |
@${MV} ${WRKSRC_plugin_ratiocolor}/* ${WRKSRC}/plugins/ratiocolor/ |
219 |
|
220 |
do-install: |
221 |
# Prepare. |
222 |
@${FIND} ${WRKSRC} -name '*.orig' -delete |
223 |
@${FIND} ${WRKSRC} -name '*.bak' -delete |
224 |
@${FIND} ${WRKSRC} -name '.gitignore' -delete |
225 |
@${MKDIR} ${STAGEDIR}${WWWDIR} |
226 |
# Install base files. |
227 |
.for _dir in conf css images js lang php share |
228 |
@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${_dir} ${STAGEDIR}${WWWDIR}) |
229 |
.endfor |
230 |
.for _file in index.html |
231 |
${INSTALL_DATA} ${WRKSRC}/${_file} ${STAGEDIR}${WWWDIR}/ |
232 |
.endfor |
233 |
# Install base plugins. |
234 |
@${MKDIR} ${STAGEDIR}${WWWDIR}/plugins |
235 |
.for _dir in _getdir _noty _noty2 _task |
236 |
@(cd ${WRKSRC}/plugins && ${COPYTREE_SHARE} ${_dir} ${STAGEDIR}${WWWDIR}/plugins) |
237 |
.endfor |
238 |
# Install selected plugins. |
239 |
.for _opt in ${OPTIONS_GROUP_PLUGINS} ${OPTIONS_GROUP_3RDPARTY} |
240 |
. if ${PORT_OPTIONS:M${_opt}} |
241 |
. for _dir in ${${_opt}_DIRS} |
242 |
@(cd ${WRKSRC}/plugins && ${COPYTREE_SHARE} ${_dir} ${STAGEDIR}${WWWDIR}/plugins) |
243 |
. endfor |
244 |
. endif |
245 |
.endfor |
246 |
# Fix perms. |
247 |
@${FIND} ${STAGEDIR}${WWWDIR} -type f -name "*.sh" -exec ${CHMOD} +x {} \+ |
248 |
@${CHMOD} -R 0777 ${STAGEDIR}${WWWDIR}/share |
249 |
@${CHMOD} 0644 ${STAGEDIR}${WWWDIR}/share/.htaccess |
250 |
# Rename config files to .sample. |
251 |
.for _conf in access.ini config.php plugins.ini |
252 |
@${MV} ${STAGEDIR}${WWWDIR}/conf/${_conf} ${STAGEDIR}${WWWDIR}/conf/${_conf}.sample |
253 |
.endfor |
254 |
# Rename plugins configs to .sample. |
255 |
@${FIND} ${STAGEDIR}${WWWDIR}/plugins -maxdepth 2 -type f \ |
256 |
-name "conf.php" -exec ${MV} {} {}.sample \; |
257 |
|
258 |
post-install-EXAMPLES-on: |
259 |
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR} |
260 |
${INSTALL_DATA} ${FILESDIR}/rutorent.conf ${STAGEDIR}${EXAMPLESDIR}/ |
261 |
|
262 |
post-stage: |
263 |
# Generate plist. |
264 |
@${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh makeplist | \ |
265 |
${GREP} -v ^\/ | \ |
266 |
${SED} -e 's|%%WWWDIR%%|www/${PORTNAME}|' \ |
267 |
-e 's|%%PORTEXAMPLES%%||' \ |
268 |
-e 's|%%EXAMPLESDIR%%|share/examples/${PORTNAME}|' \ |
269 |
> ${TMPPLIST} |
270 |
# Mark config files as samples in plist. |
271 |
@${REINPLACE_CMD} -E "s|(.*\.sample)$$|@sample \1|" ${TMPPLIST} |
272 |
|
273 |
.include <bsd.port.mk> |