Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a new "mkports.sh" helper script, which will convert the git tree…

… into

the pcbsd-utils & pcbsd-utils-qt4 ports.

While here, convert the pcbsd-utils port to use STAGING
  • Loading branch information...
commit c60c60450ce0eb946fe414172941d586e8b71757 1 parent 55ea386
@kmoore134 kmoore134 authored
Showing with 353 additions and 212 deletions.
  1. +73 −0 mkports.sh
  2. +1 −0  src-sh/Makefile
  3. +7 −7 src-sh/about/Makefile
  4. +10 −10 src-sh/de-info/Makefile
  5. +7 −6 src-sh/libsh/Makefile
  6. +3 −1 src-sh/lpreserver/Makefile
  7. +10 −3 src-sh/lpreserver/install.sh
  8. +3 −1 src-sh/pbi-manager/Makefile
  9. +14 −16 src-sh/pbi-manager/install.sh
  10. +5 −1 src-sh/pbi-manager/pbi-manager
  11. +2 −7 src-sh/pbi-manager/wrapper/Makefile
  12. +3 −1 src-sh/pbi-manager10/Makefile
  13. +7 −6 src-sh/pbreg/Makefile
  14. +3 −1 src-sh/pc-adctl/bin/Makefile
  15. +2 −1  src-sh/pc-adctl/conf/Makefile
  16. +2 −1  src-sh/pc-adctl/pc-krbconf/Makefile
  17. +2 −1  src-sh/pc-adctl/pc-ldapconf/Makefile
  18. +2 −1  src-sh/pc-adctl/pc-nssconf/Makefile
  19. +2 −1  src-sh/pc-adctl/pc-nssldapconf/Makefile
  20. +2 −1  src-sh/pc-adctl/pc-pamconf/Makefile
  21. +2 −1  src-sh/pc-adctl/pc-sambaconf/Makefile
  22. +2 −1  src-sh/pc-adctl/rc/Makefile
  23. +2 −1  src-sh/pc-adctl/scripts/Makefile
  24. +7 −6 src-sh/pc-checkxdisplay/Makefile
  25. +3 −1 src-sh/pc-extractoverlay/Makefile
  26. +21 −13 src-sh/pc-extractoverlay/install.sh
  27. +6 −7 src-sh/pc-fbsdupdatecheck/Makefile
  28. +8 −6 src-sh/pc-firstgui/Makefile
  29. +12 −10 src-sh/pc-metapkgmanager/Makefile
  30. +8 −6 src-sh/pc-runxgui/Makefile
  31. +8 −7 src-sh/pc-su/Makefile
  32. +2 −1  src-sh/pc-sysinstall/Makefile
  33. +4 −2 src-sh/pc-sysinstall/install.sh
  34. +12 −10 src-sh/pc-thinclient/Makefile
  35. +12 −10 src-sh/pc-updatemanager/Makefile
  36. +17 −17 src-sh/pc-xdgutil/Makefile
  37. +2 −15 src-sh/port-files/Makefile
  38. +6 −0 src-sh/port-files/pkg-install
  39. +21 −15 src-sh/port-files/pkg-plist
  40. +3 −1 src-sh/warden/Makefile
  41. +23 −14 src-sh/warden/install.sh
  42. +3 −1 src-sh/xtrafiles/Makefile
  43. +9 −1 src-sh/xtrafiles/install.sh
View
73 mkports.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+# Helper script which will create the port / distfiles
+# from a checked out git repo
+
+# Set the distfile URL we will fetch from
+DURL="http://www.pcbsd.org/~kris/software/"
+
+get_last_rev_git()
+{
+ oPWD=`pwd`
+ cd "${1}"
+ rev=0
+ rev=`git log -n 1 --date=raw | grep 'Date:' | awk '{print $2}'`
+ cd $oPWD
+ if [ $rev -ne 0 ] ; then
+ echo "$rev"
+ return 0
+ fi
+ return 1
+}
+
+if [ -z "$1" ] ; then
+ echo "Usage: ./mkports.sh <outdir>"
+ exit 1
+fi
+
+if [ ! -d "${1}" ] ; then
+ echo "Invalid directory: $1"
+ exit 1
+fi
+
+portsdir="${1}"
+distdir="${1}/distfiles"
+if [ ! -d "$portsdir" ] ; then
+ mkdir ${portsdir}
+fi
+if [ ! -d "$portsdir/sysutils" ] ; then
+ mkdir ${portsdir}/sysutils
+fi
+if [ ! -d "$distdir" ] ; then
+ mkdir ${distdir}
+fi
+
+cliREV=`get_last_rev_git "./src-sh"`
+guiREV=`get_last_rev_git "./src-qt4"`
+
+# Make the dist files
+rm ${distdir}/pcbsd-utils*.tar.bz2 2>/dev/null
+echo "Creating pcbsd-utils dist file for version: $cliREV"
+tar cvjf ${distdir}/pcbsd-utils-${cliREV}.tar.bz2 src-sh 2>/dev/null
+echo "Creating pcbsd-utils-qt4 dist file for version: $guiREV"
+tar cvjf ${distdir}/pcbsd-utils-qt4-${guiREV}.tar.bz2 src-qt4 2>/dev/null
+
+# Copy ports files
+rm -rf ${portsdir}/sysutils/pcbsd-utils 2>/dev/null
+rm -rf ${portsdir}/sysutils/pcbsd-utils-qt4 2>/dev/null
+cp -r src-sh/port-files ${portsdir}/sysutils/pcbsd-utils
+cp -r src-qt4/port-files ${portsdir}/sysutils/pcbsd-utils-qt4
+
+# Set the version numbers
+sed -i '' "s|CHGVERSION|${cliREV}|g" ${portsdir}/sysutils/pcbsd-utils/Makefile
+sed -i '' "s|CHGVERSION|${guiREV}|g" ${portsdir}/sysutils/pcbsd-utils-qt4/Makefile
+
+# Set the mirror to use
+sed -i '' "s|http://www.pcbsd.org/~kris/software/|${DURL}|g" ${portsdir}/sysutils/pcbsd-utils/Makefile
+sed -i '' "s|http://www.pcbsd.org/~kris/software/|${DURL}|g" ${portsdir}/sysutils/pcbsd-utils-qt4/Makefile
+
+# Create the makesums / distinfo file
+cd ${distdir}
+sha256 pcbsd-utils-${cliREV}.tar.bz2 > ${portsdir}/sysutils/pcbsd-utils/distinfo
+echo "SIZE (pcbsd-utils-${cliREV}.tar.bz2) = `stat -f \"%z\" pcbsd-utils-${cliREV}.tar.bz2`" >> ${portsdir}/sysutils/pcbsd-utils/distinfo
+sha256 pcbsd-utils-qt4-${guiREV}.tar.bz2 > ${portsdir}/sysutils/pcbsd-utils-qt4/distinfo
+echo "SIZE (pcbsd-utils-qt4-${guiREV}.tar.bz2) = `stat -f \"%z\" pcbsd-utils-qt4-${guiREV}.tar.bz2`" >> ${portsdir}/sysutils/pcbsd-utils-qt4/distinfo
View
1  src-sh/Makefile
@@ -19,6 +19,7 @@ DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
+PREFIX?= $(STAGEDIR)/usr/local
SUBTARGETS = \
sub-libsh \
sub-lpreserver \
View
14 src-sh/about/Makefile
@@ -4,8 +4,8 @@
####### Compiler, tools and options
+PREFIX?= /usr/local
AR = ar cqs
-QMAKE = /usr/local/bin/qmake-qt4
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
@@ -31,18 +31,18 @@ clean:
check: first
install_scripts: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_FILE) about $(INSTALL_ROOT)/usr/local/bin/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ -$(INSTALL_FILE) about $(INSTALL_ROOT)$(PREFIX)/bin/
uninstall_scripts: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/bin/about
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/bin/about
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/bin/
install_dochmod: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- chmod 755 /usr/local/bin/about
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/about
install: install_scripts install_dochmod FORCE
View
20 src-sh/de-info/Makefile
@@ -3,7 +3,7 @@
#############################################################################
####### Compiler, tools and options
-
+PREFIX?= /usr/local
AR = ar cqs
RANLIB =
TAR = tar -cf
@@ -30,23 +30,23 @@ all: Makefile $(TARGET)
check: first
install_scripts: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_FILE) de-info $(INSTALL_ROOT)/usr/local/bin/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ -$(INSTALL_FILE) de-info $(INSTALL_ROOT)$(PREFIX)/bin/
uninstall_scripts: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/bin/de-info
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/bin/de-info
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/bin/
install_dochmod: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- chmod 755 /usr/local/bin/de-info
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/de-info
install_ddirs: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/pcbsd/de-profiles/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/de-profiles/
- -$(INSTALL_DIR) de-profiles $(INSTALL_ROOT)/usr/local/share/pcbsd
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/de-profiles/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/de-profiles/
+ -$(INSTALL_DIR) de-profiles $(INSTALL_ROOT)$(PREFIX)/share/pcbsd
uninstall_ddirs: FORCE
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/de-profiles/
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/de-profiles/
install: install_scripts install_dochmod install_ddirs FORCE
View
13 src-sh/libsh/Makefile
@@ -4,6 +4,7 @@
####### Compiler, tools and options
+PREFIX?= /usr/local
AR = ar cqs
TAR = tar -cf
COMPRESS = gzip -9f
@@ -30,18 +31,18 @@ clean:
check: first
install_scripts: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/pcbsd/scripts/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/scripts/
- -$(INSTALL_FILE) functions.sh $(INSTALL_ROOT)/usr/local/share/pcbsd/scripts/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/scripts/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/scripts/
+ -$(INSTALL_FILE) functions.sh $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/scripts/
uninstall_scripts: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/pcbsd/scripts/functions.sh
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/scripts
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/scripts/functions.sh
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/scripts
install_dochmod: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/pcbsd/scripts/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/scripts/
- chmod 755 /usr/local/share/pcbsd/scripts/functions.sh
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/scripts/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/scripts/
+ chmod 755 $(PREFIX)/share/pcbsd/scripts/functions.sh
install: install_scripts install_dochmod FORCE
View
4 src-sh/lpreserver/Makefile
@@ -4,9 +4,11 @@
####### Install
+PREFIX?= /usr/local
+
all:
install_doinstall:
- sh install.sh
+ sh install.sh $(PREFIX)
install: install_doinstall
View
13 src-sh/lpreserver/install.sh
@@ -1,14 +1,21 @@
#!/bin/sh
+
+if [ -z "$1" ] ; then
+ STAGEDIR="/usr/local"
+else
+ STAGEDIR="$1"
+fi
+
# lpreserver install script
-PROGDIR="/usr/local/share/lpreserver"
+PROGDIR="${STAGEDIR}/share/lpreserver"
mkdir -p ${PROGDIR} >/dev/null 2>/dev/null
DIR=`dirname $0`
cd ${DIR}
-cp lpreserver /usr/local/bin/lpreserver
-chmod 755 /usr/local/bin/lpreserver
+cp lpreserver ${STAGEDIR}/bin/lpreserver
+chmod 755 ${STAGEDIR}/bin/lpreserver
if [ -d "${PROGDIR}/backend" ] ; then
rm -rf ${PROGDIR}/backend
View
4 src-sh/pbi-manager/Makefile
@@ -2,11 +2,13 @@
# Makefile for building: pbi-manager
#############################################################################
+PREFIX?= $(STAGEDIR)
+
####### Install
all:
install_doinstall:
- sh install.sh
+ sh install.sh $(PREFIX)
install: install_doinstall
View
30 src-sh/pbi-manager/install.sh
@@ -52,14 +52,14 @@ mkdir -p ${LB}/man/man1 >/dev/null 2>/dev/null
for i in `ls man1/`
do
rm ${LB}/man/man1/${i}.gz >/dev/null 2>/dev/null
- cp man1/${i} ${LB}/man/man1/${i}
+ gzip -c man1/${i} > ${LB}/man/man1/${i}.gz
done
mkdir -p ${LB}/man/man5 >/dev/null 2>/dev/null
for i in `ls man5/`
do
rm ${LB}/man/man5/${i}.gz >/dev/null 2>/dev/null
- cp man5/${i} ${LB}/man/man5/${i}
+ gzip -c man5/${i} > ${LB}/man/man5/${i}.gz
done
@@ -67,7 +67,7 @@ mkdir -p ${LB}/man/man8 >/dev/null 2>/dev/null
for i in `ls man8/`
do
rm ${LB}/man/man8/${i}.gz >/dev/null 2>/dev/null
- cp man8/${i} ${LB}/man/man8/${i}
+ gzip -c man8/${i} > ${LB}/man/man8/${i}.gz
done
if [ -d "${LB}/share/pbi-manager" ] ; then rm -rf "${LB}/share/pbi-manager" ; fi
@@ -82,9 +82,9 @@ cp ${DIR}/icons/default.png ${LB}/share/pbi-manager/icons
cp ${DIR}/icons/patch.png ${LB}/share/pbi-manager/icons
# If this is a new install, add the PC-BSD master repo
-if [ ! -d "/var/db/pbi/keys" ] ; then
- pbi_addrepo ${DIR}/repo/pcbsd.rpo
-fi
+#if [ ! -d "/var/db/pbi/keys" ] ; then
+# pbi_addrepo ${DIR}/repo/pcbsd.rpo
+#fi
# Copy the default PC-BSD repo file
cp ${DIR}/repo/pcbsd.rpo ${LB}/share/pbi-manager/pcbsd.rpo
@@ -96,20 +96,18 @@ ${LB}/sbin/pbi_info >/dev/null 2>/dev/null
cp ${DIR}/rc.d/pbid ${LB}/etc/rc.d/pbid
cp ${DIR}/etc/pbi.conf ${LB}/etc/pbi.conf
-if [ ! -d "/usr/pbi" ] ; then mkdir /usr/pbi ; fi
-
# Create the wrapper binary
cd ${DIR}/wrapper
if [ `uname -m` = "amd64" ] ; then
# Build 32bit wrapper
echo "Building i386 wrapper..."
- rm .pbiwrapper >/dev/null 2>/dev/null
+ rm pbiwrapper >/dev/null 2>/dev/null
make clean
make DEFINES="-mtune=i386 -march=i386 -m32"
make install
- chown root:wheel /usr/pbi/.pbiwrapper
- chmod 644 /usr/pbi/.pbiwrapper
- mv /usr/pbi/.pbiwrapper ${LB}/share/pbi-manager/.pbiwrapper-i386
+ chown root:wheel pbiwrapper
+ chmod 644 pbiwrapper
+ mv pbiwrapper ${LB}/share/pbi-manager/.pbiwrapper-i386
else
touch ${LB}/share/pbi-manager/.pbiwrapper-i386
fi
@@ -118,10 +116,10 @@ fi
echo "Building `uname -m` wrapper..."
DEFINES=""
export DEFINES
-rm .pbiwrapper >/dev/null 2>/dev/null
+rm pbiwrapper >/dev/null 2>/dev/null
make clean
make DEFINES=""
make install DEFINES=""
-chown root:wheel /usr/pbi/.pbiwrapper
-chmod 644 /usr/pbi/.pbiwrapper
-mv /usr/pbi/.pbiwrapper ${LB}/share/pbi-manager/.pbiwrapper-`uname -m`
+chown root:wheel pbiwrapper
+chmod 644 pbiwrapper
+mv pbiwrapper ${LB}/share/pbi-manager/.pbiwrapper-`uname -m`
View
6 src-sh/pbi-manager/pbi-manager
@@ -7516,7 +7516,11 @@ getZFSTank() {
}
# Source our shared PCBSD functions
-. /usr/local/share/pcbsd/scripts/functions.sh
+if [ -z "$ALTPROGPREFIX" ] ; then
+ . ${ALTPROGPREFIX}/share/pcbsd/scripts/functions.sh
+else
+ . /usr/local/share/pcbsd/scripts/functions.sh
+fi
# Set the default umask
umask 022
View
9 src-sh/pbi-manager/wrapper/Makefile
@@ -14,7 +14,6 @@ LFLAGS = -Wl,-O1 $(DEFINES)
LIBS = $(SUBLIBS)
AR = ar cqs
RANLIB =
-QMAKE = /usr/local/bin/qmake-qt4
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
@@ -40,9 +39,8 @@ OBJECTS_DIR = ./
SOURCES = main.c
OBJECTS = main.o
-MAKE_TARGET = .pbiwrapper
-DESTDIR = /usr/pbi/
-TARGET = .pbiwrapper
+MAKE_TARGET = pbiwrapper
+TARGET = pbiwrapper
first: all
####### Implicit rules
@@ -69,7 +67,6 @@ first: all
all: Makefile $(TARGET)
$(TARGET): $(OBJECTS)
- @$(CHK_DIR_EXISTS) /usr/pbi/ || $(MKDIR) /usr/pbi/
$(CC) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
Makefile:
@@ -124,8 +121,6 @@ main.o: main.c
####### Install
install_scripts: first FORCE
- -@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/pbi || $(MKDIR) $(INSTALL_ROOT)/usr/pbi/
- -$(INSTALL_FILE) .pbiwrapper $(INSTALL_ROOT)/usr/pbi/.pbiwrapper
install: FORCE install_scripts
View
4 src-sh/pbi-manager10/Makefile
@@ -2,11 +2,13 @@
# Makefile for building: pbi-manager
#############################################################################
+PREFIX?= /usr/local
+
####### Install
all:
install_doinstall:
- sh install.sh
+ sh install.sh $(PREFIX)
install: install_doinstall
View
13 src-sh/pbreg/Makefile
@@ -4,6 +4,7 @@
####### Compiler, tools and options
+PREFIX?= /usr/local
AR = ar cqs
TAR = tar -cf
COMPRESS = gzip -9f
@@ -30,18 +31,18 @@ clean:
check: first
install_scripts: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_FILE) pbreg $(INSTALL_ROOT)/usr/local/bin/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ -$(INSTALL_FILE) pbreg $(INSTALL_ROOT)$(PREFIX)/bin/
uninstall_scripts: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/bin/pbreg
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/bin/pbreg
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/bin/
install_dochmod: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- chmod 755 /usr/local/bin/pbreg
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/pbreg
install: install_scripts install_dochmod FORCE
View
4 src-sh/pc-adctl/bin/Makefile
@@ -1,7 +1,9 @@
+PREFIX?= /usr/local
+
FILES=pc-adctl pc-ldapctl
FILESMODE=0555
-FILESDIR=/usr/local/bin
+FILESDIR=$(PREFIX)/bin
NO_OBJ=
.include <bsd.prog.mk>
View
3  src-sh/pc-adctl/conf/Makefile
@@ -1,7 +1,8 @@
+PREFIX?= /usr/local
FILES=pc-activedirectory.conf pc-ldap.conf
FILESMODE=0400
-FILESDIR=/usr/local/etc/
+FILESDIR=$(PREFIX)/etc/
NO_OBJ=
.include <bsd.prog.mk>
View
3  src-sh/pc-adctl/pc-krbconf/Makefile
@@ -4,11 +4,12 @@
.include <bsd.own.mk>
+PREFIX?= /usr/local
MAN=
PROGOWN= root
PROGGRP= wheel
PROGMODE= 0555
-DESTDIR= /usr/local/bin
+DESTDIR= $(PREFIX)/bin
PROG= pc-krbconf
SRCS= pc-krbconf.c pc-krbconf.h
View
3  src-sh/pc-adctl/pc-ldapconf/Makefile
@@ -4,11 +4,12 @@
.include <bsd.own.mk>
+PREFIX?= /usr/local
MAN=
PROGOWN= root
PROGGRP= wheel
PROGMODE= 0555
-DESTDIR= /usr/local/bin
+DESTDIR= $(PREFIX)/bin
PROG= pc-ldapconf
SRCS= pc-ldapconf.c pc-ldapconf.h
View
3  src-sh/pc-adctl/pc-nssconf/Makefile
@@ -4,11 +4,12 @@
.include <bsd.own.mk>
+PREFIX?= /usr/local
MAN=
PROGOWN= root
PROGGRP= wheel
PROGMODE= 0555
-DESTDIR= /usr/local/bin
+DESTDIR= $(PREFIX)/bin
PROG= pc-nssconf
SRCS= pc-nssconf.c pc-nssconf.h
View
3  src-sh/pc-adctl/pc-nssldapconf/Makefile
@@ -4,11 +4,12 @@
.include <bsd.own.mk>
+PREFIX?= /usr/local
MAN=
PROGOWN= root
PROGGRP= wheel
PROGMODE= 0555
-DESTDIR= /usr/local/bin
+DESTDIR= $(PREFIX)/bin
PROG= pc-nssldapconf
SRCS= pc-nssldapconf.c pc-nssldapconf.h
View
3  src-sh/pc-adctl/pc-pamconf/Makefile
@@ -4,11 +4,12 @@
.include <bsd.own.mk>
+PREFIX?= /usr/local
MAN=
PROGOWN= root
PROGGRP= wheel
PROGMODE= 0555
-DESTDIR= /usr/local/bin
+DESTDIR= $(PREFIX)/bin
PROG= pc-pamconf
SRCS= pc-pamconf.c pc-pamconf.h
View
3  src-sh/pc-adctl/pc-sambaconf/Makefile
@@ -4,11 +4,12 @@
.include <bsd.own.mk>
+PREFIX?= /usr/local
MAN=
PROGOWN= root
PROGGRP= wheel
PROGMODE= 0555
-DESTDIR= /usr/local/bin
+DESTDIR= $(PREFIX)/bin
PROG= pc-sambaconf
SRCS= pc-sambaconf.c pc-sambaconf.h
View
3  src-sh/pc-adctl/rc/Makefile
@@ -1,7 +1,8 @@
+PREFIX?= /usr/local
FILES=rc.activedirectory rc.ldap
FILESMODE=0444
-FILESDIR=/usr/local/etc/
+FILESDIR=$(PREFIX)/etc/
NO_OBJ=
.include <bsd.prog.mk>
View
3  src-sh/pc-adctl/scripts/Makefile
@@ -1,8 +1,9 @@
+PREFIX?= /usr/local
FILES=pc-activedirectory pc-kerberos pc-kinit pc-nsswitch pc-pam \
pc-samba pc-ldap pc-nssldap pc-directory
FILESMODE=0555
-FILESDIR=/usr/local/etc/rc.d
+FILESDIR=$(PREFIX)/etc/rc.d
NO_OBJ=
.include <bsd.prog.mk>
View
13 src-sh/pc-checkxdisplay/Makefile
@@ -2,6 +2,7 @@
# Makefile for building: pc-checkxdisplay
#############################################################################
+PREFIX?= /usr/local
FILE = pc-checkxdisplay
AR = ar cqs
RANLIB =
@@ -27,18 +28,18 @@ first: all
all:
install_scripts: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_FILE) $(FILE) $(INSTALL_ROOT)/usr/local/bin/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ -$(INSTALL_FILE) $(FILE) $(INSTALL_ROOT)$(PREFIX)/bin/
uninstall_scripts: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/bin/$(FILE)
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/bin/$(FILE)
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/bin/
install_dochmod: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- chmod 755 /usr/local/bin/$(FILE)
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/$(FILE)
install: install_scripts install_dochmod FORCE
View
4 src-sh/pc-extractoverlay/Makefile
@@ -2,11 +2,13 @@
# Makefile for building: pc-extractoverlay
#############################################################################
+PREFIX?= /usr/local
+
####### Install
all:
install_doinstall:
- sh install.sh
+ sh install.sh $(PREFIX)
install: install_doinstall
View
34 src-sh/pc-extractoverlay/install.sh
@@ -1,55 +1,63 @@
#!/bin/sh
-cp pc-extractoverlay /usr/local/bin/pc-extractoverlay
+DEFAULT="/usr/local"
+
+if [ -z "$1" ] ; then
+ LB="${DEFAULT}"
+else
+ LB="${1}"
+fi
+
+cp pc-extractoverlay ${LB}/bin/pc-extractoverlay
if [ $? -ne 0 ] ; then
exit 1
fi
-chmod 755 /usr/local/bin/pc-extractoverlay
+chmod 755 ${LB}/bin/pc-extractoverlay
if [ $? -ne 0 ] ; then
exit 1
fi
-if [ ! -d "/usr/local/share/pcbsd/conf" ] ; then
- mkdir -p /usr/local/share/pcbsd/conf
+if [ ! -d "${LB}/share/pcbsd/conf" ] ; then
+ mkdir -p ${LB}/share/pcbsd/conf
fi
-if [ ! -d "/usr/local/share/pcbsd/distfiles" ] ; then
- mkdir -p /usr/local/share/pcbsd/distfiles
+if [ ! -d "${LB}/share/pcbsd/distfiles" ] ; then
+ mkdir -p ${LB}/share/pcbsd/distfiles
fi
# Copy port prune list
-cp prune-port-files /usr/local/share/pcbsd/conf
+cp prune-port-files ${LB}/share/pcbsd/conf
if [ $? -ne 0 ] ; then
exit 1
fi
# Copy exclude list
-cp port-excludes /usr/local/share/pcbsd/conf
+cp port-excludes ${LB}/share/pcbsd/conf
if [ $? -ne 0 ] ; then
exit 1
fi
-cp desktop-excludes /usr/local/share/pcbsd/conf
+cp desktop-excludes ${LB}/share/pcbsd/conf
if [ $? -ne 0 ] ; then
exit 1
fi
-cp server-excludes /usr/local/share/pcbsd/conf
+cp server-excludes ${LB}/share/pcbsd/conf
if [ $? -ne 0 ] ; then
exit 1
fi
# Now create overlay.txz file
-tar cvJf /usr/local/share/pcbsd/distfiles/port-overlay.txz -C ports-overlay .
+tar cvJ --uname "root" --gname "wheel" -f ${LB}/share/pcbsd/distfiles/port-overlay.txz -C ports-overlay .
if [ $? -ne 0 ] ; then
exit 1
fi
# Now create desktop-overlay.txz file
-tar cvJf /usr/local/share/pcbsd/distfiles/desktop-overlay.txz -C desktop-overlay .
+tar cvJ --uname "root" --gname "wheel" -f ${LB}/share/pcbsd/distfiles/desktop-overlay.txz -C desktop-overlay .
if [ $? -ne 0 ] ; then
exit 1
fi
# Now create server-overlay.txz file
-tar cvJf /usr/local/share/pcbsd/distfiles/server-overlay.txz -C server-overlay .
+tar cvJ --uname "root" --gname "wheel" -f ${LB}/share/pcbsd/distfiles/server-overlay.txz -C server-overlay .
if [ $? -ne 0 ] ; then
exit 1
fi
View
13 src-sh/pc-fbsdupdatecheck/Makefile
@@ -1,6 +1,7 @@
#############################################################################
-# Makefile for building: /usr/local/bin/pc-fbsdupdatecheck
+# Makefile for building: $(PREFIX)/bin/pc-fbsdupdatecheck
#############################################################################
+PREFIX?= /usr/local
####### Compiler, tools and options
@@ -9,13 +10,11 @@ CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -O2 -Wall -W $(DEFINES)
CXXFLAGS = -pipe -O2 -Wall -W $(DEFINES)
-INCPATH = -I/usr/local/include -I. -I/usr/local/include
LINK = g++
LFLAGS = -Wl,-O1 -pthread
LIBS = $(SUBLIBS)
AR = ar cqs
RANLIB =
-QMAKE = /usr/local/bin/qmake-qt4
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
@@ -42,7 +41,7 @@ OBJECTS_DIR = ./
SOURCES = main.c
OBJECTS = main.o
MAKE_TARGET = pc-fbsdupdatecheck
-DESTDIR = /usr/local/bin/
+DESTDIR = $(PREFIX)/bin/
TARGET = pc-fbsdupdatecheck
first: all
@@ -70,7 +69,7 @@ first: all
all: Makefile $(TARGET)
$(TARGET): $(OBJECTS)
- @$(CHK_DIR_EXISTS) /usr/local/bin/ || $(MKDIR) /usr/local/bin/
+ @$(CHK_DIR_EXISTS) $(PREFIX)/bin/ || $(MKDIR) $(PREFIX)/bin/
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
Makefile:
@@ -125,8 +124,8 @@ main.o: main.c
####### Install
install_scripts: first FORCE
- -@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_FILE) pc-fbsdupdatecheck $(INSTALL_ROOT)/usr/local/bin/
+ -@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ -$(INSTALL_FILE) pc-fbsdupdatecheck $(INSTALL_ROOT)$(PREFIX)/bin/
install: FORCE install_scripts
View
14 src-sh/pc-firstgui/Makefile
@@ -4,6 +4,8 @@
####### Compiler, tools and options
+PREFIX?= /usr/local
+
AR = ar cqs
TAR = tar -cf
COMPRESS = gzip -9f
@@ -30,18 +32,18 @@ clean:
check: first
install_scripts: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_FILE) pc-firstgui $(INSTALL_ROOT)/usr/local/bin/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ -$(INSTALL_FILE) pc-firstgui $(INSTALL_ROOT)$(PREFIX)/bin/
uninstall_scripts: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/bin/pc-firstgui
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/bin/pc-firstgui
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/bin/
install_dochmod: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- chmod 755 /usr/local/bin/pc-firstgui
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/pc-firstgui
install: install_scripts install_dochmod FORCE
View
22 src-sh/pc-metapkgmanager/Makefile
@@ -4,6 +4,8 @@
####### Compiler, tools and options
+PREFIX?= /usr/local
+
AR = ar cqs
RANLIB =
TAR = tar -cf
@@ -30,20 +32,20 @@ all: Makefile $(TARGET)
check: first
install_scripts: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_FILE) pc-metapkgmanager $(INSTALL_ROOT)/usr/local/bin/
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/pcbsd/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/pcbsd/metaset/ || rm -rf /usr/local/share/pcbsd/metaset
- cp -r metaset /usr/local/share/pcbsd/metaset
- cd /usr/local/bin/ && ln -f pc-metapkgmanager pc-pkg
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ -$(INSTALL_FILE) pc-metapkgmanager $(INSTALL_ROOT)$(PREFIX)/bin/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/metaset/ || rm -rf $(PREFIX)/share/pcbsd/metaset
+ cp -r metaset $(PREFIX)/share/pcbsd/metaset
+ cd $(PREFIX)/bin/ && ln -f pc-metapkgmanager pc-pkg
uninstall_scripts: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/bin/pc-metapkgmanager
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/bin/pc-metapkgmanager
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/bin/
install_dochmod: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- chmod 755 /usr/local/bin/pc-metapkgmanager
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/pc-metapkgmanager
install: install_scripts install_dochmod FORCE
View
14 src-sh/pc-runxgui/Makefile
@@ -2,6 +2,8 @@
# Makefile for building: pc-runxgui
#############################################################################
+PREFIX?= /usr/local
+
AR = ar cqs
RANLIB =
TAR = tar -cf
@@ -26,18 +28,18 @@ first: all
all:
install_scripts: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_FILE) pc-runxgui $(INSTALL_ROOT)/usr/local/bin/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ -$(INSTALL_FILE) pc-runxgui $(INSTALL_ROOT)$(PREFIX)/bin/
uninstall_scripts: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/bin/pc-runxgui
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/bin/pc-runxgui
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/bin/
install_dochmod: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- chmod 755 /usr/local/bin/pc-runxgui
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/pc-runxgui
install: install_scripts install_dochmod FORCE
View
15 src-sh/pc-su/Makefile
@@ -4,8 +4,9 @@
####### Compiler, tools and options
+PREFIX?= /usr/local
+
AR = ar cqs
-QMAKE = /usr/local/bin/qmake-qt4
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
@@ -31,18 +32,18 @@ clean:
check: first
install_scripts: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_FILE) pc-su $(INSTALL_ROOT)/usr/local/bin/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ -$(INSTALL_FILE) pc-su $(INSTALL_ROOT)$(PREFIX)/bin/
uninstall_scripts: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/bin/pc-su
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/bin/pc-su
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/bin/
install_dochmod: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- chmod 755 /usr/local/bin/pc-su
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/pc-su
install: install_scripts install_dochmod FORCE
View
3  src-sh/pc-sysinstall/Makefile
@@ -1,12 +1,13 @@
#############################################################################
# Makefile for building: pc-sysinstall
#############################################################################
+PREFIX?= /usr/local
####### Install
all:
install_doinstall:
- sh install.sh
+ sh install.sh $(PREFIX)
install: install_doinstall
View
6 src-sh/pc-sysinstall/install.sh
@@ -1,7 +1,9 @@
#!/bin/sh
-if [ -z "$LOCALBASE" ] ; then
+if [ -z "$1" ] ; then
LOCALBASE=/usr/local
+else
+ LOCALBASE="$1"
fi
if [ -d "${LOCALBASE}/share/pc-sysinstall" ] ; then
@@ -26,7 +28,7 @@ do
if [ -e "${LOCALBASE}/man/man8/${i}.gz" ] ; then
rm ${LOCALBASE}/man/man8/${i}.gz >/dev/null 2>/dev/null
fi
- cp man8/${i} ${LOCALBASE}/man/man8/${i}
+ gzip -c man8/${i} > ${LOCALBASE}/man/man8/${i}.gz
done
# Install the executable
View
22 src-sh/pc-thinclient/Makefile
@@ -2,6 +2,8 @@
# Makefile for building: pc-xdgutil
#############################################################################
+PREFIX?= /usr/local
+
AR = ar cqs
RANLIB =
TAR = tar -cf
@@ -26,27 +28,27 @@ first: all
all:
install_scripts: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_FILE) pc-thinclient $(INSTALL_ROOT)/usr/local/bin/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ -$(INSTALL_FILE) pc-thinclient $(INSTALL_ROOT)$(PREFIX)/bin/
uninstall_scripts: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/bin/pc-thinclient
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/bin/pc-thinclient
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/bin/
install_dochmod: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- chmod 755 /usr/local/bin/pc-thinclient
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/pc-thinclient
install_ddirs: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-thinclient/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-thinclient/
- -$(INSTALL_DIR) resources $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-thinclient/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-thinclient/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-thinclient/
+ -$(INSTALL_DIR) resources $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-thinclient/
uninstall_ddirs: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-thinclient/resources
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-thinclient/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-thinclient/resources
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-thinclient/
install: install_scripts install_dochmod install_ddirs FORCE
View
22 src-sh/pc-updatemanager/Makefile
@@ -2,6 +2,8 @@
# Makefile for building: pc-updatemanager
#############################################################################
+PREFIX?= /usr/local
+
AR = ar cqs
RANLIB =
TAR = tar -cf
@@ -26,27 +28,27 @@ first: all
all:
install_scripts: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_FILE) pc-updatemanager $(INSTALL_ROOT)/usr/local/bin/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ -$(INSTALL_FILE) pc-updatemanager $(INSTALL_ROOT)$(PREFIX)/bin/
uninstall_scripts: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/bin/pc-updatemanager
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/bin/pc-updatemanager
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/bin/
install_dochmod: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- chmod 755 /usr/local/bin/pc-updatemanager
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/pc-updatemanager
install_conf: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-updatemanager/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-updatemanager/
- -$(INSTALL_DIR) conf $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-updatemanager/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-updatemanager/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-updatemanager/
+ -$(INSTALL_DIR) conf $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-updatemanager/
uninstall_conf: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-updatemanager/conf
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-updatemanager
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-updatemanager/conf
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-updatemanager
install: install_scripts install_dochmod install_conf FORCE
View
34 src-sh/pc-xdgutil/Makefile
@@ -2,9 +2,9 @@
# Makefile for building: pc-xdgutil
#############################################################################
+PREFIX?= /usr/local
AR = ar cqs
RANLIB =
-QMAKE = /usr/local/bin/qmake-qt4
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
@@ -27,40 +27,40 @@ first: all
all:
install_scripts: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_FILE) pc-xdgutil $(INSTALL_ROOT)/usr/local/bin/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ -$(INSTALL_FILE) pc-xdgutil $(INSTALL_ROOT)$(PREFIX)/bin/
uninstall_scripts: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/bin/pc-xdgutil
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/bin/pc-xdgutil
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/bin/
install_dochmod: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- chmod 755 /usr/local/bin/pc-xdgutil
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/bin/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/pc-xdgutil
install_ddirs: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-xdgutil/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-xdgutil/
- -$(INSTALL_DIR) desktop-dirs $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-xdgutil/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-xdgutil/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-xdgutil/
+ -$(INSTALL_DIR) desktop-dirs $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-xdgutil/
uninstall_ddirs: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-xdgutil/desktop-dirs
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-xdgutil/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-xdgutil/desktop-dirs
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-xdgutil/
install_xdgmenu: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-xdgutil/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-xdgutil/
- -$(INSTALL_FILE) menus/applications.menu $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-xdgutil/
- -$(INSTALL_FILE) menus/xfce-applications.menu $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-xdgutil/
+ @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-xdgutil/ || $(MKDIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-xdgutil/
+ -$(INSTALL_FILE) menus/applications.menu $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-xdgutil/
+ -$(INSTALL_FILE) menus/xfce-applications.menu $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-xdgutil/
uninstall_xdgmenu: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-xdgutil/applications.menu
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-xdgutil/xfce-applications.menu
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-xdgutil/
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-xdgutil/applications.menu
+ -$(DEL_FILE) -r $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-xdgutil/xfce-applications.menu
+ -$(DEL_DIR) $(INSTALL_ROOT)$(PREFIX)/share/pcbsd/pc-xdgutil/
install: install_scripts install_dochmod install_ddirs install_xdgmenu FORCE
View
17 src-sh/port-files/Makefile
@@ -27,28 +27,15 @@ RUN_DEPENDS= pkg-static:${PORTSDIR}/ports-mgmt/pkg \
WRKSRC= ${WRKDIR}/src-sh
CONFLICTS?= pbi-manager-[0-9]*
NO_BUILD= yes
-NO_STAGE= yes
USE_BZIP2= yes
USE_PYTHON= yes
-MAN1= pbi_add.1 pbi_browser.1 pbi_create.1 \
- pbi_delete.1 \
- pbi_icon.1 pbi_indextool.1 pbi_info.1 \
- pbi_listrepo.1 pbi_update.1 \
- pbi_metatool.1 \
- pbi_patch.1 \
- pbi_update_hashdir.1
-MAN5= pbi.conf.5
-MAN8= pbi_addrepo.8 pbi_autobuild.8 pbi_deleterepo.8 \
- pbi_makepatch.8 pbi_makeport.8 pbi_makerepo.8 pbid.8 \
- pc-sysinstall.8
-
.include <bsd.port.pre.mk>
do-install:
- cd ${WRKSRC} && make install
+ cd ${WRKSRC} && make install PREFIX=$(STAGEDIR)$(PREFIX)
post-install:
- PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ PKG_PREFIX=${STAGEDIR}${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.post.mk>
View
6 src-sh/port-files/pkg-install
@@ -7,6 +7,12 @@ if [ "$2" != "POST-INSTALL" ] ; then
exit 0
fi
+# If this is during staging, we can skip for now
+echo $PREFIX | grep -q '/stage/'
+if [ $? -eq 0 ] ; then
+ exit 0
+fi
+
# If this is a new install, add the PC-BSD master repo
ls /var/db/pbi/keys/* 2>/dev/null >/dev/null
if [ $? -ne 0 ] ; then
View
36 src-sh/port-files/pkg-plist
@@ -624,6 +624,27 @@ share/pbi-manager/module-examples/firefox/pbi.conf
share/pbi-manager/icons/default.png
share/pbi-manager/icons/patch.png
share/pbi-manager/pcbsd.rpo
+man/man1/pbi_add.1.gz
+man/man1/pbi_browser.1.gz
+man/man1/pbi_create.1.gz
+man/man1/pbi_delete.1.gz
+man/man1/pbi_icon.1.gz
+man/man1/pbi_indextool.1.gz
+man/man1/pbi_info.1.gz
+man/man1/pbi_listrepo.1.gz
+man/man1/pbi_update.1.gz
+man/man1/pbi_metatool.1.gz
+man/man1/pbi_patch.1.gz
+man/man1/pbi_update_hashdir.1.gz
+man/man5/pbi.conf.5.gz
+man/man8/pbi_addrepo.8.gz
+man/man8/pbi_autobuild.8.gz
+man/man8/pbi_deleterepo.8.gz
+man/man8/pbi_makepatch.8.gz
+man/man8/pbi_makeport.8.gz
+man/man8/pbi_makerepo.8.gz
+man/man8/pbid.8.gz
+man/man8/pc-sysinstall.8.gz
@dirrm share/pbi-manager/module-examples/firefox/resources
@dirrm share/pbi-manager/module-examples/firefox/scripts
@dirrm share/pbi-manager/module-examples/firefox/xdg-desktop
@@ -654,7 +675,6 @@ share/pbi-manager/pcbsd.rpo
@dirrm share/pc-sysinstall/doc
@dirrm share/pc-sysinstall/examples
@dirrm share/pc-sysinstall
-@dirrmtry share/pcbsd/icons
@dirrm share/pcbsd/metaset/trueos/File-Servers
@dirrm share/pcbsd/metaset/trueos/PostgreSQL
@dirrm share/pcbsd/metaset/trueos/Lighttp
@@ -755,17 +775,3 @@ share/pbi-manager/pcbsd.rpo
@dirrm share/pcbsd
@dirrm share/lpreserver/backend
@dirrm share/lpreserver
-@unexec rmdir /usr/pbi/.hashdir >/dev/null 2>/dev/null
-@unexec rmdir /usr/pbi/share/applications >/dev/null 2>/dev/null
-@unexec rmdir /usr/pbi/share/desktop-directories >/dev/null 2>/dev/null
-@unexec rmdir /usr/pbi/share/icons/hicolor >/dev/null 2>/dev/null
-@unexec rmdir /usr/pbi/share/icons >/dev/null 2>/dev/null
-@unexec rmdir /usr/pbi/share/mime/packages >/dev/null 2>/dev/null
-@unexec rmdir /usr/pbi/share/mime >/dev/null 2>/dev/null
-@unexec rmdir /usr/pbi/share >/dev/null 2>/dev/null
-@unexec rmdir /usr/pbi/etc/xdg/menus >/dev/null 2>/dev/null
-@unexec rmdir /usr/pbi/etc/xdg >/dev/null 2>/dev/null
-@unexec rmdir /usr/pbi/etc >/dev/null 2>/dev/null
-@unexec rm /usr/pbi/.pbiwrapper-amd64 >/dev/null 2>/dev/null
-@unexec rm /usr/pbi/.pbiwrapper-i386 >/dev/null 2>/dev/null
-@unexec rmdir /usr/pbi >/dev/null 2>/dev/null
View
4 src-sh/warden/Makefile
@@ -2,11 +2,13 @@
# Makefile for building: warden
#############################################################################
+PREFIX?= /usr/local
+
####### Install
all:
install_doinstall:
- sh install.sh
+ sh install.sh $(PREFIX)
install: install_doinstall
View
37 src-sh/warden/install.sh
@@ -1,6 +1,15 @@
#!/bin/sh
# Warden install script
-PROGDIR="/usr/local/share/warden"
+
+DEFAULT="/usr/local"
+
+if [ -z "$1" ] ; then
+ LB="${DEFAULT}"
+else
+ LB="${1}"
+fi
+
+PROGDIR="${LB}/share/warden"
mkdir -p ${PROGDIR} >/dev/null 2>/dev/null
@@ -10,27 +19,27 @@ mkdir ${PROGDIR}/export >/dev/null 2>/dev/null
DIR=`dirname $0`
cd ${DIR}
-cp bin/warden /usr/local/bin/warden
-chmod 755 /usr/local/bin/warden
+cp bin/warden ${LB}/bin/warden
+chmod 755 ${LB}/bin/warden
# Save existing settings
-if [ -e "/usr/local/etc/warden.conf" ] ; then
- NIC=`grep '^NIC:' /usr/local/etc/warden.conf | awk '{print $2}'`
- WTMP=`grep '^WTMP:' /usr/local/etc/warden.conf | awk '{print $2}'`
- JDIR=`grep '^JDIR:' /usr/local/etc/warden.conf | awk '{print $2}'`
+if [ -e "${LB}/etc/warden.conf" ] ; then
+ NIC=`grep '^NIC:' ${LB}/etc/warden.conf | awk '{print $2}'`
+ WTMP=`grep '^WTMP:' ${LB}/etc/warden.conf | awk '{print $2}'`
+ JDIR=`grep '^JDIR:' ${LB}/etc/warden.conf | awk '{print $2}'`
ONIC=`grep '^NIC:' conf/warden.conf`
OWTMP=`grep '^WTMP:' conf/warden.conf`
OJDIR=`grep '^JDIR:' conf/warden.conf`
fi
-cp conf/warden.conf /usr/local/etc/warden.conf
-chmod 644 /usr/local/etc/warden.conf
+cp conf/warden.conf ${LB}/etc/warden.conf
+chmod 644 ${LB}/etc/warden.conf
# Save the settings
if [ -n "$NIC" ] ; then
- sed -i '' "s|$ONIC|NIC: $NIC|g" /usr/local/etc/warden.conf
- sed -i '' "s|$OWTMP|WTMP: $WTMP|g" /usr/local/etc/warden.conf
- sed -i '' "s|$OJDIR|JDIR: $JDIR|g" /usr/local/etc/warden.conf
+ sed -i '' "s|$ONIC|NIC: $NIC|g" ${LB}/etc/warden.conf
+ sed -i '' "s|$OWTMP|WTMP: $WTMP|g" ${LB}/etc/warden.conf
+ sed -i '' "s|$OJDIR|JDIR: $JDIR|g" ${LB}/etc/warden.conf
fi
if [ -d "${PROGDIR}/linux-installs" ] ; then
@@ -46,8 +55,8 @@ cp -r scripts ${PROGDIR}
chmod 755 ${PROGDIR}/scripts/backend/*
# Setup rc.d
-cp scripts/rc.d/wardenrc /usr/local/etc/rc.d/wardenrc
-chmod 755 /usr/local/etc/rc.d/wardenrc
+cp scripts/rc.d/wardenrc ${LB}/etc/rc.d/wardenrc
+chmod 755 ${LB}/etc/rc.d/wardenrc
cp agent.png ${PROGDIR}/
cp agent.png ${PROGDIR}/warden.png
View
4 src-sh/xtrafiles/Makefile
@@ -2,11 +2,13 @@
# Makefile for building: pc-extractoverlay
#############################################################################
+PREFIX?= /usr/local
+
####### Install
all:
install_doinstall:
- sh install.sh
+ sh install.sh $(PREFIX)
install: install_doinstall
View
10 src-sh/xtrafiles/install.sh
@@ -1,7 +1,15 @@
#!/bin/sh
+DEFAULT="/usr/local"
+
+if [ -z "$1" ] ; then
+ LB="${DEFAULT}"
+else
+ LB="${1}"
+fi
+
# Copy files to system
-tar cvf - -C local . 2>/dev/null | tar xvf - -C /usr/local
+tar cvf - -C local . 2>/dev/null | tar xvf - -C ${LB}
if [ $? -ne 0 ] ; then
exit 1
fi
Please sign in to comment.
Something went wrong with that request. Please try again.