Commit 8db016c2 authored by claes's avatar claes

OpenBSD pwrrt package

parent 2e4f535d
...@@ -2679,6 +2679,8 @@ char *cdh_OpSysToStr( pwr_mOpSys opsys) ...@@ -2679,6 +2679,8 @@ char *cdh_OpSysToStr( pwr_mOpSys opsys)
case pwr_mOpSys_X86_64_MACOS: strcpy( str, "x86_64_macos"); break; case pwr_mOpSys_X86_64_MACOS: strcpy( str, "x86_64_macos"); break;
case pwr_mOpSys_ARM_LINUX: strcpy( str, "arm_linux"); break; case pwr_mOpSys_ARM_LINUX: strcpy( str, "arm_linux"); break;
case pwr_mOpSys_X86_64_FREEBSD: strcpy( str, "x86_64_freebsd"); break; case pwr_mOpSys_X86_64_FREEBSD: strcpy( str, "x86_64_freebsd"); break;
case pwr_mOpSys_X86_64_OPENBSD: strcpy( str, "x86_64_openbsd"); break;
case pwr_mOpSys_X86_CYGWIN: strcpy( str, "x86_cygwin"); break;
default: strcpy( str, ""); default: strcpy( str, "");
} }
return str; return str;
...@@ -2707,6 +2709,8 @@ char *cdh_OpSysToDirStr( pwr_mOpSys opsys) ...@@ -2707,6 +2709,8 @@ char *cdh_OpSysToDirStr( pwr_mOpSys opsys)
case pwr_mOpSys_X86_64_MACOS: strcpy( str, "os_macos/hw_x86_64"); break; case pwr_mOpSys_X86_64_MACOS: strcpy( str, "os_macos/hw_x86_64"); break;
case pwr_mOpSys_ARM_LINUX: strcpy( str, "os_linux/hw_arm"); break; case pwr_mOpSys_ARM_LINUX: strcpy( str, "os_linux/hw_arm"); break;
case pwr_mOpSys_X86_64_FREEBSD: strcpy( str, "os_freebsd/hw_x86_64"); break; case pwr_mOpSys_X86_64_FREEBSD: strcpy( str, "os_freebsd/hw_x86_64"); break;
case pwr_mOpSys_X86_64_OPENBSD: strcpy( str, "os_openbsd/hw_x86_64"); break;
case pwr_mOpSys_X86_CYGWIN: strcpy( str, "os_cygwin/hw_x86"); break;
default: strcpy( str, ""); default: strcpy( str, "");
} }
return str; return str;
......
#!/bin/bash #!/bin/bash
set -o xtrace
aroot="/usr/pwrp/adm" aroot="/usr/pwrp/adm"
pkgsrc=$pwre_sroot/tools/pkg/openbsd/pwr
# Get version # Get version
if [ -e $pwr_inc/pwr_version.h ]; then if [ -e $pwr_inc/pwr_version.h ]; then
ver=`eval cat $pwr_inc/pwr_version.h | grep "[[:<:]]pwrv_cWbdbVersionShortStr[[:>:]]" | awk '{print $3}'` ver=`eval cat $pwr_inc/pwr_version.h | grep "[[:<:]]pwrv_cWbdbVersionShortStr[[:>:]]" | awk '{print $3}'`
...@@ -20,11 +15,11 @@ fi ...@@ -20,11 +15,11 @@ fi
# Generate version help file # Generate version help file
{ {
if [ ! -e $pkgsrc/control ]; then if [ ! -e $pwre_sroot/tools/pkg/deb/pwr/control ]; then
echo "Controlfile not found" echo "Controlfile not found"
exit 1 exit 1
fi fi
datfile=$pkgsrc/control datfile=$pwre_sroot/tools/pkg/deb/pwr/control
echo "<topic> version" echo "<topic> version"
d=`eval date +\"%F %X\"` d=`eval date +\"%F %X\"`
...@@ -98,77 +93,78 @@ if [ "$1" == "-v" ]; then ...@@ -98,77 +93,78 @@ if [ "$1" == "-v" ]; then
exit exit
fi fi
pkgroot=$pwre_broot/$pwre_target/bld/pkg/pwr$ver
pkgsrc=$pwre_sroot/tools/pkg/openbsd/pwr
packagename=pwr$ver-$version.tar.gz
echo "-- Building pwr$ver" echo "-- Building pwr$ver"
packagename=pwr$ver-$version
pkgroot=$pwre_broot/$pwre_target/bld/pkg/$packagename
pkg_proot=$pwre_broot/$pwre_target/bld/pkg/$packagename/share/pwr$ver
# Create directories
echo "echo pwr$ver dummy" > $pkgroot/bin/pwr$ver
chmod a+x $pkgroot/bin/pwr$ver
mkdir -p $pkgroot/share/pwr$ver
mkdir -p $pkg_proot/usr/pwrp # Create directories
mkdir -p $pkg_proot/etc mkdir -p $pkgroot/etc/pwr$ver
mkdir -p $pkg_proot/bin mkdir -p $pkgroot/usr/share/doc/pwr$ver
echo "Start pwr$ver with command pwra" > $pkg_proot/share/pwr$ver/README mkdir -p $pkgroot/usr/pwrp
cp $pkgsrc/postinst $pkg_proot/install.site mkdir -p $pkgroot/etc
find $pkg_proot -type d | xargs chmod 755 find $pkgroot -type d | xargs chmod 755
# copyright # copyright
cp $pkgsrc/copyright $pkg_proot/usr/share/doc/pwr$ver cp $pkgsrc/copyright $pkgroot/usr/share/doc/pwr$ver
# changelog
cp $pkgsrc/changelog $pkgroot/usr/share/doc/pwr$ver
gzip -fq --best $pkgroot/usr/share/doc/pwr$ver/changelog
# Man pages # Man pages
mkdir -p $pkg_proot/usr/share/man/man1 mkdir -p $pkgroot/usr/share/man/man1
cp $pkgsrc/pwr.1 $pkg_proot/usr/share/man/man1/pwr.1 cp $pkgsrc/pwr.1 $pkgroot/usr/share/man/man1/pwr.1
gzip -fq --best $pkg_proot/usr/share/man/man1/pwr.1 gzip -fq --best $pkgroot/usr/share/man/man1/pwr.1
# Copy proview # Copy proview
mkdir $pkg_proot/usr/pwr$ver mkdir $pkgroot/usr/pwr$ver
currentdir="`eval pwd`" currentdir="`eval pwd`"
tarfile=$pwre_broot/$pwre_target/bld/pkg/pwrtmp.tar tarfile=$pwre_broot/$pwre_target/bld/pkg/pwrtmp.tar
cd $pwre_broot cd $pwre_broot
echo "-- copy release to package tree" echo "-- copy release to package tree"
tar -cf $tarfile $pwre_target/exp tar -cf $tarfile $pwre_target/exp
cd $pkg_proot/usr/pwr$ver cd $pkgroot/usr/pwr$ver
tar -xf $tarfile tar -xf $tarfile
rm $tarfile rm $tarfile
cd $currentdir cd $currentdir
# Remove not needed libraries # Remove not needed libraries
rm $pkg_proot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_flow.a rm $pkgroot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_flow.a
rm $pkg_proot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_ge.a rm $pkgroot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_ge.a
rm $pkg_proot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_glow.a rm $pkgroot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_glow.a
rm $pkg_proot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_tlog.a rm $pkgroot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_tlog.a
rm $pkg_proot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_wb.a rm $pkgroot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_wb.a
rm $pkg_proot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_xtt.a rm $pkgroot/usr/pwr$ver/$pwre_target/exp/lib/libpwr_xtt.a
# Copy configuration files to cnf # Copy configuration files to cnf
cp $pkgsrc/proview.cnf $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf cp $pkgsrc/proview.cnf $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf
cp $pkgsrc/pwrp_profile $pkg_proot/etc cp $pkgsrc/pwrp_profile $pkgroot/etc
chmod a+x $pkg_proot/etc/pwrp_profile chmod a+x $pkgroot/etc/pwrp_profile
# Copy adm files to cnf # Copy adm files to cnf
cp $pwre_sroot/tools/pkg/deb/adm/pwr_setup.sh $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf cp $pwre_sroot/tools/pkg/deb/adm/pwr_setup.sh $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf
echo "pwrp set base V${ver:0:1}.${ver:1:1}" >> $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/pwr_setup.sh echo "pwrp set base V${ver:0:1}.${ver:1:1}" >> $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/pwr_setup.sh
chmod a+x $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/pwr_setup.sh chmod a+x $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/pwr_setup.sh
cp $pwre_sroot/tools/pkg/deb/adm/pwra_env.sh $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf cp $pwre_sroot/tools/pkg/deb/adm/pwra_env.sh $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf
chmod a+x $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/pwra_env.sh chmod a+x $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/pwra_env.sh
cp $pwre_sroot/tools/pkg/deb/adm/pwr_volumelist.dat $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf cp $pwre_sroot/tools/pkg/deb/adm/pwr_volumelist.dat $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf
cp $pwre_sroot/tools/pkg/deb/adm/pwr_user2.dat $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf cp $pwre_sroot/tools/pkg/deb/adm/pwr_user2.dat $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf
cp $pwre_sroot/tools/pkg/deb/adm/proview_icon.png $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf cp $pwre_sroot/tools/pkg/deb/adm/proview_icon.png $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf
# Copy user to cnf # Copy user to cnf
mkdir $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user mkdir $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.bashrc $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user cp $pwre_sroot/tools/pkg/openbsd/user/.bashrc $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
echo "source $aroot/db/pwr_setup.sh" >> $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user/.bashrc echo "source $aroot/db/pwr_setup.sh" >> $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user/.bashrc
cp $pwre_sroot/tools/pkg/deb/user/.bash_profile $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user cp $pwre_sroot/tools/pkg/deb/user/.bash_profile $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
#cp $pwre_sroot/tools/pkg/deb/user/.mwmrc $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user #cp $pwre_sroot/tools/pkg/deb/user/.mwmrc $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.rtt_start $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user cp $pwre_sroot/tools/pkg/deb/user/.rtt_start $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/.xtt_start $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user cp $pwre_sroot/tools/pkg/deb/user/.xtt_start $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
#cp $pwre_sroot/tools/pkg/deb/user/.xsession $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user #cp $pwre_sroot/tools/pkg/deb/user/.xsession $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/wtt_init.pwr_com $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user cp $pwre_sroot/tools/pkg/deb/user/wtt_init.pwr_com $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
cp $pwre_sroot/tools/pkg/deb/user/wtt_init1.pwr_com $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user cp $pwre_sroot/tools/pkg/deb/user/wtt_init1.pwr_com $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user
# Generate desktop file # Generate desktop file
{ {
...@@ -181,25 +177,24 @@ cp $pwre_sroot/tools/pkg/deb/user/wtt_init1.pwr_com $pkg_proot/usr/pwr$ver/$pwre ...@@ -181,25 +177,24 @@ cp $pwre_sroot/tools/pkg/deb/user/wtt_init1.pwr_com $pkg_proot/usr/pwr$ver/$pwre
echo "Exec=xterm -title \"Proview Development Console\" -e 'export pwra_db=$aroot/db;source \$pwra_db/pwra_env.sh set base V""${version:0:3}"";source \$pwra_db/pwra_env.sh set bus;wb -p pwrp pwrp'" echo "Exec=xterm -title \"Proview Development Console\" -e 'export pwra_db=$aroot/db;source \$pwra_db/pwra_env.sh set base V""${version:0:3}"";source \$pwra_db/pwra_env.sh set bus;wb -p pwrp pwrp'"
echo "Icon=$aroot/db/proview_icon.png" echo "Icon=$aroot/db/proview_icon.png"
echo "Categories=GNOME;GTK;Application;" echo "Categories=GNOME;GTK;Application;"
} > $pkg_proot/usr/pwr$ver/$pwre_target/exp/cnf/user/proview$ver.desktop } > $pkgroot/usr/pwr$ver/$pwre_target/exp/cnf/user/proview$ver.desktop
# Create package # Create package
echo "-- Building package" echo "-- Building package"
cd $pwre_broot/$pwre_target/bld/pkg
tar -czf /usr/ports/distfiles/$packagename.tar.gz $packagename mkdir -p $pkgroot/etc/pwr$ver
mkdir -p /usr/ports/mystuff/misc/pwr$ver cd $pkgroot
cd /usr/ports/mystuff/misc/pwr$ver find * -type f -exec echo "rm -f /{}" \; > $pkgroot/etc/pwr$ver/rmfiles.sh
cp $pkgsrc/Makefile . echo "rm -r /usr/pwr$ver" >> $pkgroot/etc/pwr$ver/rmfiles.sh
make makesum
mkdir pkg # control
echo "Proview development and runtime package" > pkg/DESCR cp $pkgsrc/control $pkgroot/etc/pwr$ver
if [ -e /usr/obj/ports/$pkgname ]; then cp $pkgsrc/prerm $pkgroot/etc/pwr$ver
rm -r /usr/obj/ports/$pkgname cp $pkgsrc/postinst $pkgroot/etc/pwr$ver
fi
make fake tar -czf ../$packagename *
make plist
make package rm -r $pkgroot
#rm -r $pgkroot
......
#!/bin/sh #!/usr/local/bin/bash
set -e set -e
# ver=""
if [ ! -e /usr/local/bin/bash ]; then
echo "** Error, bash not installed"
exit
fi
if [ ! -e /bin/bash ]; then
ln -s /usr/local/bin/bash /bin/bash
fi
# Get version from current path
dname=`eval dirname $0`
pwrdir=`eval bash -c "cd $dname; pwd"`
ver="${pwrdir:8:1}${pwrdir:9:1}"
# pwre_target="" # pwre_target=""
echo "Here in postinst..." echo "Here in postinst..."
...@@ -28,7 +42,7 @@ if getent passwd pwrp > /dev/null; then ...@@ -28,7 +42,7 @@ if getent passwd pwrp > /dev/null; then
else else
new_user=1 new_user=1
if useradd -s /bin/bash -p aaupl/kQs1p3U -g pwrp -d /home/pwrp pwrp; then if useradd -m -s /bin/bash -p aaupl/kQs1p3U -g pwrp -d /home/pwrp pwrp; then
echo "-- user pwrp added" echo "-- user pwrp added"
fi fi
if [ ! -e /home/pwrp ]; then if [ ! -e /home/pwrp ]; then
...@@ -72,10 +86,10 @@ if [ ! -e /etc/proview.cnf ]; then ...@@ -72,10 +86,10 @@ if [ ! -e /etc/proview.cnf ]; then
fi fi
# Add pwrp_profile to profile # Add pwrp_profile to profile
if ! grep -q "/etc/pwrp_profile\b" /etc/profile; then if ! grep -q "/etc/pwrp_profile[[:>:]]" /etc/profile; then
cat >> /etc/profile <<-EOF cat >> /etc/profile <<-EOF
if [ -e /etc/pwrp_profile ]; then if [ -e /etc/pwrp_profile ]; then
source /etc/pwrp_profile . /etc/pwrp_profile
fi fi
EOF EOF
fi fi
...@@ -100,7 +114,7 @@ if [ ! -e $aroot/db/pwr_projectlist.dat ]; then ...@@ -100,7 +114,7 @@ if [ ! -e $aroot/db/pwr_projectlist.dat ]; then
echo "%base V${ver:0:1}.${ver:1:1} /usr/pwr$ver" > $aroot/db/pwr_projectlist.dat echo "%base V${ver:0:1}.${ver:1:1} /usr/pwr$ver" > $aroot/db/pwr_projectlist.dat
else else
set +e set +e
ptst=`eval grep "^%base" $aroot/db/pwr_projectlist.dat | grep "\bV${ver:0:1}.${ver:1:1}\b"` ptst=`eval grep "^%base" $aroot/db/pwr_projectlist.dat | grep "[[:<:]]V${ver:0:1}.${ver:1:1}[[:>:]]"`
set -e set -e
if [ "$ptst" = "" ]; then if [ "$ptst" = "" ]; then
echo "%base V${ver:0:1}.${ver:1:1} /usr/pwr$ver" >> $aroot/db/pwr_projectlist.dat echo "%base V${ver:0:1}.${ver:1:1} /usr/pwr$ver" >> $aroot/db/pwr_projectlist.dat
......
#!/bin/sh #!/usr/local/bin/bash
set -e set -e
echo "Here in prerm..." echo "Here in prerm..."
# Automatically added by dh_installdocs # Automatically added by dh_installdocs
...@@ -6,3 +6,7 @@ if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/pwrtest ]; then ...@@ -6,3 +6,7 @@ if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/pwrtest ]; then
rm -f /usr/doc/pwrtest rm -f /usr/doc/pwrtest
fi fi
# End automatically added section # End automatically added section
dname=`eval dirname $0`
chmod a+x $dname/rmfiles.sh
$dname/rmfiles.sh
...@@ -20,15 +20,19 @@ export pwr_load=$pwrb_root/load ...@@ -20,15 +20,19 @@ export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc export pwr_doc=$pwrb_root/doc
export pwrp_exe=$pwrp_root/x86_linux/exe export pwrp_exe=$pwrp_root/x86_64_openbsd/exe
export pwrp_lib=$pwrp_root/x86_linux/lib export pwrp_lib=$pwrp_root/x86_64_openbsd/lib
export pwrp_obj=$pwrp_root/x86_linux/obj export pwrp_obj=$pwrp_root/x86_64_openbsd/obj
export pwrp_lis=$pwrp_root/x86_linux/lis export pwrp_lis=$pwrp_root/x86_64_openbsd/lis
export pwrp_inc=$pwrp_root/common/inc export pwrp_inc=$pwrp_root/common/inc
export pwrp_load=$pwrp_root/common/load export pwrp_load=$pwrp_root/common/load
export pwrp_log=$pwrp_root/common/log export pwrp_log=$pwrp_root/common/log
export pwrp_db=$pwrp_root/common/db export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir if [ "$web_dir" = "" ]; then
export pwrp_web=$pwrp_root/common/web
else
export pwrp_web=$web_dir
fi
export pwra_db=/usr/pwrp/adm/db export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls -t /usr/local | grep ^jdk` jdk=`eval ls -t /usr/local | grep ^jdk`
...@@ -44,10 +48,10 @@ PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home ...@@ -44,10 +48,10 @@ PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
export DISPLAY=$REMOTEHOST:0.0 export DISPLAY=$REMOTEHOST:0.0
#symbols to define start/stop commands for PWR #symbols to define start/stop commands for PWR
alias pwr_stop='/etc/init.d/pwr stop' alias pwr_stop='/etc/pwrrt/pwr stop'
alias pwr_stop.sh="/etc/init.d/pwr stop" alias pwr_stop.sh="/etc/pwrrt/pwr stop"
alias pwr_start="/etc/init.d/pwr start" alias pwr_start="/etc/pwrrt/pwr start"
alias pwr="/etc/init.d/pwr" alias pwr="/etc/pwrrt/pwr"
alias boot="/usr/bin/sudo /sbin/reboot" alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then if [ -e $pwrp_exe/profile ]; then
......
...@@ -95,7 +95,7 @@ if [ "$1" == "-v" ]; then ...@@ -95,7 +95,7 @@ if [ "$1" == "-v" ]; then
fi fi
pkgroot=$pwre_broot/$pwre_target/bld/pkg/pwrrt pkgroot=$pwre_broot/$pwre_target/bld/pkg/pwrrt
pkgsrc=$pwre_sroot/tools/pkg/deb/pwrrt pkgsrc=$pwre_sroot/tools/pkg/openbsd/pwrrt
packagename=pwrrt-$version.tar.gz packagename=pwrrt-$version.tar.gz
# Create directories # Create directories
...@@ -113,10 +113,6 @@ cp $pkgsrc/copyright $pkgroot/usr/share/doc/pwrrt ...@@ -113,10 +113,6 @@ cp $pkgsrc/copyright $pkgroot/usr/share/doc/pwrrt
cp $pkgsrc/changelog $pkgroot/usr/share/doc/pwrrt cp $pkgsrc/changelog $pkgroot/usr/share/doc/pwrrt
gzip -fq --best $pkgroot/usr/share/doc/pwrrt/changelog gzip -fq --best $pkgroot/usr/share/doc/pwrrt/changelog
# changelog.Debian
cp $pkgsrc/changelog.Debian $pkgroot/usr/share/doc/pwrrt
gzip -fq --best $pkgroot/usr/share/doc/pwrrt/changelog.Debian
# Startup files # Startup files
cp $pkgsrc/pwrp_profile $pkgroot/etc cp $pkgsrc/pwrp_profile $pkgroot/etc
chmod a+x $pkgroot/etc/pwrp_profile chmod a+x $pkgroot/etc/pwrp_profile
...@@ -183,6 +179,7 @@ echo "rm -r /usr/pwrrt" >> $pkgroot/etc/pwrrt/rmfiles.sh ...@@ -183,6 +179,7 @@ echo "rm -r /usr/pwrrt" >> $pkgroot/etc/pwrrt/rmfiles.sh
cp $pkgsrc/control $pkgroot/etc/pwrrt cp $pkgsrc/control $pkgroot/etc/pwrrt
cp $pkgsrc/prerm $pkgroot/etc/pwrrt cp $pkgsrc/prerm $pkgroot/etc/pwrrt
cp $pkgsrc/postinst $pkgroot/etc/pwrrt cp $pkgsrc/postinst $pkgroot/etc/pwrrt
cp $pkgsrc/pwr $pkgroot/etc/pwrrt
tar -czf ../$packagename * tar -czf ../$packagename *
......
Proview V3.4b (3.4.1-1)
\ No newline at end of file
...@@ -181,16 +181,16 @@ chmod u+s /usr/pwrrt/exe/rt_rtt ...@@ -181,16 +181,16 @@ chmod u+s /usr/pwrrt/exe/rt_rtt
#chmod u+s /usr/pwrrt/exe/rt_xtt #chmod u+s /usr/pwrrt/exe/rt_xtt
chmod u+s /usr/pwrrt/exe/rt_bck chmod u+s /usr/pwrrt/exe/rt_bck
chmod u+s /usr/pwrrt/exe/rt_gdhget chmod u+s /usr/pwrrt/exe/rt_gdhget
chown root /usr/pwrrt/exe/rs_remote_alcm #chown root /usr/pwrrt/exe/rs_remote_alcm
chmod u+s /usr/pwrrt/exe/rs_remote_alcm #chmod u+s /usr/pwrrt/exe/rs_remote_alcm
if getent group dialout > /dev/null; then if getent group dialout > /dev/null; then
chgrp dialout /usr/pwrrt/exe/rs_remote_serial chgrp dialout /usr/pwrrt/exe/rs_remote_serial
chmod ug+s /usr/pwrrt/exe/rs_remote_serial chmod ug+s /usr/pwrrt/exe/rs_remote_serial
chgrp dialout /usr/pwrrt/exe/rs_remote_3964r chgrp dialout /usr/pwrrt/exe/rs_remote_3964r
chmod ug+s /usr/pwrrt/exe/rs_remote_3964r chmod ug+s /usr/pwrrt/exe/rs_remote_3964r
fi fi
chown root /usr/pwrrt/exe/rt_prio #chown root /usr/pwrrt/exe/rt_prio
chmod u+s /usr/pwrrt/exe/rt_prio #chmod u+s /usr/pwrrt/exe/rt_prio
chown root /usr/pwrrt/exe/rt_mozilla chown root /usr/pwrrt/exe/rt_mozilla
chmod u+s /usr/pwrrt/exe/rt_mozilla chmod u+s /usr/pwrrt/exe/rt_mozilla
...@@ -205,28 +205,18 @@ fi ...@@ -205,28 +205,18 @@ fi
if ! grep -q "/etc/pwrp_profile[[:>:]]" /etc/profile; then if ! grep -q "/etc/pwrp_profile[[:>:]]" /etc/profile; then
cat >> /etc/profile <<-EOF cat >> /etc/profile <<-EOF
if [ -e /etc/pwrp_profile ]; then if [ -e /etc/pwrp_profile ]; then
source /etc/pwrp_profile . /etc/pwrp_profile
fi fi
EOF EOF
fi fi
# Create startup link # Create startup link
set +e if ! grep -q "/etc/pwrrt/pwr start" /etc/rc.local; then
checklink=`eval ls /etc/rc2.d/S90pwr 2>/dev/null` cat >> /etc/rc.local <<-EOF
set -e /etc/pwrrt/pwr start
if [ "$checklink" != "" ]; then EOF
rm /etc/rc2.d/S90pwr
fi fi
ln -s /etc/init.d/pwr /etc/rc2.d/S90pwr
set +e
checklink=`eval ls /etc/rc2.d/S91gdhserver 2>/dev/null`
set -e
if [ "$checklink" != "" ]; then
rm /etc/rc2.d/S91gdhserver
fi
# Obsolete
#ln -s /etc/init.d/gdhserver /etc/rc2.d/S91gdhserver
# Create project # Create project
new_project=0 new_project=0
......
#!/bin/sh #!/bin/sh
set -e set -e
# Automatically added by dh_installdocs # Automatically added by dh_installdocs
if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/pwrtest ]; then if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/pwrtest ]; then
rm -f /usr/doc/pwrtest rm -f /usr/doc/pwrtest
...@@ -21,22 +22,22 @@ if [ "$remove_all" = "y" ]; then ...@@ -21,22 +22,22 @@ if [ "$remove_all" = "y" ]; then
user_found=0 user_found=0
currentusers=`eval users` currentusers=`eval users`
userstr="" userstr=""
checkuser=`eval echo $currentusers | grep "\bb55\b"` checkuser=`eval echo $currentusers | grep "[[:<:]]b55[[:>:]]"`
if [ "$checkuser" != "" ]; then if [ "$checkuser" != "" ]; then
user_found=1 user_found=1
userstr=$userstr" b55" userstr=$userstr" b55"
fi fi
checkuser=`eval echo $currentusers | grep "\bb66\b"` checkuser=`eval echo $currentusers | grep "[[:<:]]b66[[:>:]]"`
if [ "$checkuser" != "" ]; then if [ "$checkuser" != "" ]; then
user_found=1 user_found=1
userstr=$userstr" b66" userstr=$userstr" b66"
fi fi
checkuser=`eval echo $currentusers | grep "\bpwrp\b"` checkuser=`eval echo $currentusers | grep "[[:<:]]pwrp[[:>:]]"`
if [ "$checkuser" != "" ]; then if [ "$checkuser" != "" ]; then
user_found=1 user_found=1
userstr=$userstr" pwrp" userstr=$userstr" pwrp"
fi fi
checkuser=`eval echo $currentusers | grep "\bskiftel\b"` checkuser=`eval echo $currentusers | grep "[[:<:]]skiftel[[:>:]]"`
if [ "$checkuser" != "" ]; then if [ "$checkuser" != "" ]; then
user_found=1 user_found=1
userstr=$userstr" skiftel" userstr=$userstr" skiftel"
...@@ -50,7 +51,7 @@ if [ "$remove_all" = "y" ]; then ...@@ -50,7 +51,7 @@ if [ "$remove_all" = "y" ]; then
set -e set -e
echo "-- Remove user b55" echo "-- Remove user b55"
if grep -q "\bb55:" /etc/passwd; then if grep -q "[[:<:]]b55:" /etc/passwd; then
userdel b55 userdel b55
fi fi
if [ -e /home/b55 ]; then if [ -e /home/b55 ]; then
...@@ -58,7 +59,7 @@ if [ "$remove_all" = "y" ]; then ...@@ -58,7 +59,7 @@ if [ "$remove_all" = "y" ]; then
fi fi
echo "-- Remove user b66" echo "-- Remove user b66"
if grep -q "\bb66:" /etc/passwd; then if grep -q "[[:<:]]b66:" /etc/passwd; then
userdel b66 userdel b66
fi fi
if [ -e /home/b66 ]; then if [ -e /home/b66 ]; then
...@@ -66,7 +67,7 @@ if [ "$remove_all" = "y" ]; then ...@@ -66,7 +67,7 @@ if [ "$remove_all" = "y" ]; then
fi fi
echo "-- Remove user pwrp" echo "-- Remove user pwrp"
if grep -q "\bpwrp:" /etc/passwd; then if grep -q "[[:<:]]pwrp:" /etc/passwd; then
userdel pwrp userdel pwrp
fi fi
if [ -e /home/pwrp ]; then if [ -e /home/pwrp ]; then
...@@ -74,26 +75,26 @@ if [ "$remove_all" = "y" ]; then ...@@ -74,26 +75,26 @@ if [ "$remove_all" = "y" ]; then
fi fi
echo "-- Remove user skiftel" echo "-- Remove user skiftel"
if grep -q "\bskiftel:" /etc/passwd; then if grep -q "[[:<:]]skiftel:" /etc/passwd; then
userdel skiftel userdel skiftel
fi fi
if [ -e /home/skiftel ]; then if [ -e /home/skiftel ]; then
rm -r /home/skiftel rm -r /home/skiftel
fi fi
if grep -q "\bb55:" /etc/group; then if grep -q "[[:<:]]b55:" /etc/group; then
groupdel b55 groupdel b55
fi fi
if grep -q "\bb66:" /etc/group; then if grep -q "[[:<:]]b66:" /etc/group; then
groupdel b66 groupdel b66
fi fi
if grep -q "\bpwrp:" /etc/group; then if grep -q "[[:<:]]pwrp:" /etc/group; then
groupdel pwrp groupdel pwrp
fi fi
if grep -q "\bskiftel:" /etc/group; then if grep -q "[[:<:]]skiftel:" /etc/group; then
groupdel skiftel groupdel skiftel
fi fi
...@@ -107,15 +108,9 @@ if [ "$remove_all" = "y" ]; then ...@@ -107,15 +108,9 @@ if [ "$remove_all" = "y" ]; then
fi fi
fi fi
# Remove startup
checklink=`eval ls /etc/rc2.d/S90pwr 2>/dev/null`
if [ "$checklink" != "" ]; then
rm /etc/rc2.d/S90pwr
fi
# Remove jar-files on web directory # Remove jar-files on web directory
if [ -e /etc/proview.cnf ]; then if [ -e /etc/proview.cnf ]; then
web_dir=`eval cat /etc/proview.cnf | grep "\\bwebDirectory\\b" | awk '{print $2}'` web_dir=`eval cat /etc/proview.cnf | grep "[[:<:]]webDirectory[[:>:]]" | awk '{print $2}'`
if [ -e $web_dir/pwr_rt_client.jar ]; then if [ -e $web_dir/pwr_rt_client.jar ]; then
rm $web_dir/pwr_rt_client.jar rm $web_dir/pwr_rt_client.jar
...@@ -124,3 +119,7 @@ if [ -e /etc/proview.cnf ]; then ...@@ -124,3 +119,7 @@ if [ -e /etc/proview.cnf ]; then
rm $web_dir/pwr_jop.jar rm $web_dir/pwr_jop.jar
fi fi
fi fi
dname=`eval dirname $0`
chmod a+x $dname/rmfiles.sh
$dname/rmfiles.sh
bus_id="" bus_id=""
if [ -e /etc/proview.cnf ]; then if [ -e /etc/proview.cnf ]; then
bus_id=`eval cat /etc/proview.cnf | grep "\\bqcomBusId\\b" | awk '{print $2}'` bus_id=`eval cat /etc/proview.cnf | grep "[[:<:]]qcomBusId[[:>:]]" | awk '{print $2}'`
fi fi
if [ -e /etc/proview.cnf ]; then if [ -e /etc/proview.cnf ]; then
web_dir=`eval cat /etc/proview.cnf | grep "\\bwebDirectory\\b" | awk '{print $2}'` web_dir=`eval cat /etc/proview.cnf | grep "[[:<:]]bwebDirectory[[:>:]]" | awk '{print $2}'`
fi fi
export PWR_BUS_ID=$bus_id export PWR_BUS_ID=$bus_id
...@@ -20,20 +20,24 @@ export pwr_load=$pwrb_root/load ...@@ -20,20 +20,24 @@ export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc export pwr_doc=$pwrb_root/doc
export pwrp_exe=$pwrp_root/x86_linux/exe export pwrp_exe=$pwrp_root/x86_64_openbsd/exe
export pwrp_lib=$pwrp_root/x86_linux/lib export pwrp_lib=$pwrp_root/x86_64_openbsd/lib
export pwrp_obj=$pwrp_root/x86_linux/obj export pwrp_obj=$pwrp_root/x86_64_openbsd/obj
export pwrp_lis=$pwrp_root/x86_linux/lis export pwrp_lis=$pwrp_root/x86_64_openbsd/lis
export pwrp_inc=$pwrp_root/common/inc export pwrp_inc=$pwrp_root/common/inc
export pwrp_load=$pwrp_root/common/load export pwrp_load=$pwrp_root/common/load
export pwrp_log=$pwrp_root/common/log export pwrp_log=$pwrp_root/common/log
export pwrp_db=$pwrp_root/common/db export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir if [ "$web_dir" = "" ]; then
export pwrp_web=$pwrp_root/common/web
else
export pwrp_web=$web_dir
fi
export pwra_db=/usr/pwrp/adm/db export pwra_db=/usr/pwrp/adm/db
jdk=`eval ls -t /usr/local | grep -m 1 ^jdk` jdk=`eval ls -t /usr/local | grep ^jdk`
if [ "$jdk" == "" ]; then if [ "$jdk" == "" ]; then
jdk=`eval ls -t /usr/local | grep -m 1 ^jre` jdk=`eval ls -t /usr/local | grep ^jre`
fi fi
export jdk=/usr/local/$jdk export jdk=/usr/local/$jdk
...@@ -44,10 +48,10 @@ PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home ...@@ -44,10 +48,10 @@ PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home
export DISPLAY=$REMOTEHOST:0.0 export DISPLAY=$REMOTEHOST:0.0
#symbols to define start/stop commands for PWR #symbols to define start/stop commands for PWR
alias pwr_stop='/etc/init.d/pwr stop' alias pwr_stop='/etc/pwrrt/pwr stop'
alias pwr_stop.sh="/etc/init.d/pwr stop" alias pwr_stop.sh="/etc/pwrrt/pwr stop"
alias pwr_start="/etc/init.d/pwr start" alias pwr_start="/etc/pwrrt/pwr start"
alias pwr="/etc/init.d/pwr" alias pwr="/etc/pwrrt/pwr"
alias boot="/usr/bin/sudo /sbin/reboot" alias boot="/usr/bin/sudo /sbin/reboot"
if [ -e $pwrp_exe/profile ]; then if [ -e $pwrp_exe/profile ]; then
......
...@@ -29,7 +29,8 @@ copy : ...@@ -29,7 +29,8 @@ copy :
lib : lib :
exe : $(bld_dir)/control_pwrrt $(bld_dir)/control_pwr $(bld_dir)/control_pwrdemo $(bld_dir)/control_pwrsev #exe : $(bld_dir)/control_pwrrt $(bld_dir)/control_pwr $(bld_dir)/control_pwrdemo $(bld_dir)/control_pwrsev
exe : $(bld_dir)/control_pwr $(bld_dir)/control_pwrrt
clean : clean :
......
...@@ -571,6 +571,18 @@ page_4: ...@@ -571,6 +571,18 @@ page_4:
if ( os == "MacOS") if ( os == "MacOS")
SetAttribute( attr, 256); SetAttribute( attr, 256);
endif endif
if ( os == "ARM")
SetAttribute( attr, 512);
endif
if ( os == "FreeBSD")
SetAttribute( attr, 1024);
endif
if ( os == "OpenBSD")
SetAttribute( attr, 2048);
endif
if ( os == "Cygwin")
SetAttribute( attr, 4098);
endif
attr = name + ".Address"; attr = name + ".Address";
SetAttribute( attr, node_ip[i]); SetAttribute( attr, node_ip[i]);
......
...@@ -158,8 +158,17 @@ page_4: ...@@ -158,8 +158,17 @@ page_4:
set attr/name='str1'/attr=OperatingSystem/value=64/nolog/noconf set attr/name='str1'/attr=OperatingSystem/value=64/nolog/noconf
endif endif
endif endif
if ( os == "MacOS") if ( os == "ARM")
set attr/name='str1'/attr=OperatingSystem/value=256/nolog/noconf set attr/name='str1'/attr=OperatingSystem/value=512/nolog/noconf
endif
if ( os == "FreeBSD")
set attr/name='str1'/attr=OperatingSystem/value=1024/nolog/noconf
endif
if ( os == "OpenBSD")
set attr/name='str1'/attr=OperatingSystem/value=2048/nolog/noconf
endif
if ( os == "Cygwin")
set attr/name='str1'/attr=OperatingSystem/value=4096/nolog/noconf
endif endif
if ( rv_nodehierroot != "") if ( rv_nodehierroot != "")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment