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