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