Skip to content

Commit

Permalink
initial port of LCDproc pfsense package
Browse files Browse the repository at this point in the history
This is built from the LCDproc-dev package as it's had more work and functionality added than LCDproc. LCDproc-dev was created to add early support for LCDProc 0.5.4 without affecting LCDproc, and since this port will be using LCDProc 0.5.7+, there's no need to keep maintaining two packages.
  • Loading branch information
Treer committed Aug 25, 2016
1 parent 23ea8ae commit 308076b
Show file tree
Hide file tree
Showing 11 changed files with 2,490 additions and 0 deletions.
63 changes: 63 additions & 0 deletions sysutils/pfSense-pkg-LCDproc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# $FreeBSD$

PORTNAME= pfSense-pkg-LCDproc
PORTVERSION= 0.9.15
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
EXTRACT_ONLY= # empty

MAINTAINER= [email protected]
COMMENT= LCDproc package for pfSense

# If your build machine fails with "License not correctly defined", try replacing bsd.licenses.db.mk as follows:
# cd /usr/ports/Templates/Licenses
# curl -o ESF https://raw.githubusercontent.com/pfsense/FreeBSD-ports/devel/Templates/Licenses/ESF
# cd /usr/ports/Mk
# curl -o bsd.licenses.db.mk https://raw.githubusercontent.com/pfsense/FreeBSD-ports/devel/Mk/bsd.licenses.db.mk
LICENSE= ESF

NO_BUILD= yes
NO_MTREE= yes

SUB_FILES= pkg-install pkg-deinstall
SUB_LIST= PORTNAME=${PORTNAME}

# Until the sysutils/lcdproc port is included in the pfSense-core repository catalogue
# you may have to install it manually using the following commands:
# 32bit:
# pkg install print/freetype2
# (or pkg add http://pkg.freebsd.org/freebsd:10:x86:32/release_3/All/freetype2-2.6.2.txz)
# pkg add http://pkg.freebsd.org/freebsd:10:x86:32/release_3/All/lcdproc-0.5.7_2.txz
# 64bit:
# pkg install print/freetype2
# (or pkg add http://pkg.freebsd.org/freebsd:10:x86:64/release_3/All/freetype2-2.6.2.txz)
# pkg add http://pkg.freebsd.org/freebsd:10:x86:64/release_3/All/lcdproc-0.5.7_2.txz
RUN_DEPENDS= ${LOCALBASE}/sbin/LCDd:sysutils/lcdproc

# the sysutils/lcdproc port already has this dependency
#LIB_DEPENDS= libfreetype.so:print/freetype2

do-extract:
${MKDIR} ${WRKSRC}

do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/pkg
${MKDIR} ${STAGEDIR}/etc/inc/priv
${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} -m 0644 ${FILESDIR}${PREFIX}/pkg/lcdproc.xml \
${STAGEDIR}${PREFIX}/pkg
${INSTALL_DATA} -m 0644 ${FILESDIR}${PREFIX}/pkg/lcdproc_screens.xml \
${STAGEDIR}${PREFIX}/pkg
${INSTALL_DATA} -m 0644 ${FILESDIR}${PREFIX}/pkg/lcdproc_client.php \
${STAGEDIR}${PREFIX}/pkg
${INSTALL_DATA} ${FILESDIR}${PREFIX}/pkg/lcdproc.inc \
${STAGEDIR}${PREFIX}/pkg
${INSTALL_DATA} ${FILESDIR}/etc/inc/priv/lcdproc.priv.inc \
${STAGEDIR}/etc/inc/priv
${INSTALL_DATA} ${FILESDIR}${DATADIR}/info.xml \
${STAGEDIR}${DATADIR}
@${REINPLACE_CMD} -i '' -e "s|%%PKGVERSION%%|${PKGVERSION}|" \
${STAGEDIR}${DATADIR}/info.xml

.include <bsd.port.mk>
40 changes: 40 additions & 0 deletions sysutils/pfSense-pkg-LCDproc/files/etc/inc/priv/lcdproc.priv.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
/*
lcdproc.priv.inc
part of pfSense (http://www.pfSense.org/)
Copyright (C) 2015 ESF, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
global $priv_list;

$priv_list['page-services-lcdproc'] = array();
$priv_list['page-services-lcdproc']['name'] = "WebCfg - Services: LCDproc package";
$priv_list['page-services-lcdproc']['descr'] = "Allow access to LCDproc package GUI";
$priv_list['page-services-lcdproc']['match'] = array();
$priv_list['page-services-lcdproc']['match'][] = "pkg.php?xml=lcdproc.xml*";
$priv_list['page-services-lcdproc']['match'][] = "pkg.php?xml=lcdproc_screens.xml*";
$priv_list['page-services-lcdproc']['match'][] = "pkg_edit.php?xml=lcdproc.xml*";
$priv_list['page-services-lcdproc']['match'][] = "pkg_edit.php?xml=lcdproc_screens.xml*";

?>
3 changes: 3 additions & 0 deletions sysutils/pfSense-pkg-LCDproc/files/pkg-deinstall.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

/usr/local/bin/php -f /etc/rc.packages %%PORTNAME%% ${2}
7 changes: 7 additions & 0 deletions sysutils/pfSense-pkg-LCDproc/files/pkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

if [ "${2}" != "POST-INSTALL" ]; then
exit 0
fi

/usr/local/bin/php -f /etc/rc.packages %%PORTNAME%% ${2}
Loading

1 comment on commit 308076b

@Treer
Copy link
Contributor Author

@Treer Treer commented on 308076b Jun 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By copying the files from the old package into this new ports package, I've managed to lose their git histories.

This is the git repo the files came from

Please sign in to comment.