This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
52 lines (41 loc) · 1.63 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Created by: KalleDK <[email protected]>
# $FreeBSD$
PORTNAME= plexmediaserver
PORTVERSION= 0.9.8.4.125
CATEGORIES= multimedia
MASTER_SITES= http://plex.r.worldssl.net/plex-media-server/${PORTVERSION}-${PLEX_BUILD}/
DISTNAME= PlexMediaServer-${PORTVERSION}-${PLEX_BUILD}-freebsd-amd64
MAINTAINER= [email protected]
COMMENT= Plex Media Server
USE_BZIP2= yes
PLEX_BUILD= ffe2a5d
NO_BUILD= yes
WRKSRC= ${WRKDIR}/PlexMediaServer-${PORTVERSION}-ffe2a5d
USE_RC_SUBR= plexmediaserver
SUB_FILES= plexmediaserver
SUB_LIST= SUPPORT_PATH=${SUPPORT_PATH} SCRIPT_PATH="${SCRIPT_PATH}" USERS=${USERS} GROUPS=${GROUPS}
USERS= plex
GROUPS= plex
SUPPORT_PATH?= ${PREFIX}/plexdata
SCRIPT_PATH?= ${DATADIR}
ONLY_FOR_ARCHS= amd64
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 900000
IGNORE= supplied binaries compiled for FreeBSD 9
.endif
do-install:
@(cd ${WRKSRC} && ${COPYTREE_SHARE} Resources ${SCRIPT_PATH})
${INSTALL_PROGRAM} ${WRKSRC}/Plex\ DLNA\ Server ${SCRIPT_PATH}
${INSTALL_PROGRAM} ${WRKSRC}/Plex\ Media\ Scanner ${SCRIPT_PATH}
${INSTALL_PROGRAM} ${WRKSRC}/Plex\ Media\ Server ${SCRIPT_PATH}
${INSTALL_SCRIPT} ${WRKSRC}/start.sh ${SCRIPT_PATH}
${INSTALL_LIB} ${WRKSRC}/lib* ${SCRIPT_PATH}
# Fix permissions to programs and db
@${CHMOD} a+x ${SCRIPT_PATH}/Resources/rsync
@${CHMOD} a+x ${SCRIPT_PATH}/Resources/Plex\ New\ Transcoder
@${CHMOD} a+x ${SCRIPT_PATH}/Resources/Plex\ Transcoder
@${CHMOD} a+x ${SCRIPT_PATH}/Resources/Python/bin/python
@${CHMOD} u+w ${SCRIPT_PATH}/Resources/com.plexapp.plugins.library.db
# Python fix
@${LN} -s ${SCRIPT_PATH}/libpython2.7.so.1 ${SCRIPT_PATH}/libpython2.7.so
.include <bsd.port.post.mk>