Hi Dev's,
Not sure if any one does this still but...
I was making a Solaris Nagios package and have edited the Nagios
Makefile.in as below.
I did'nt use =C2=A0the 'mkpackage' script but id suggest using gmake instea=
d of make.
=3D=3DBuilding Nagios pakage On Solaris Sparc=3D=3D
=3D=3D=3DPrepare=3D=3D=3D
=3D=3D=3D=3DInstall gcc=3D=3D=3D=3D
get the gcc package form sunfreeware
=C2=A0# wget ftp://ftp.sunfreeware.com/pub/freeware/ ... .4.6-sol1=
0-sparc-local.gz
=C2=A0# gunzip gcc-3.4.6-sol10-sparc-local.gz
=C2=A0# pkgadd -d gcc-3.4.6-sol10-sparc-local
you then need to set up the environment (you can add this to
/etc/profile or some enlivenment =C2=A0=3D)
=C2=A0# export CC ; CC=3Dgcc
=C2=A0# export LD_LIBRARY_PATH; =C2=A0LD_LIBRARY_PATH=3D/usr/sfw/lib:/usr/l=
ocal/ssl/lib
=C2=A0# export PATH ;
PATH=3D/usr/local/bin:/usr/sfw/bin:/usr/sbin:/usr/bin:/usr/ccs/bin
=3D=3D=3D=3D=3Dinstall ligiconv=3D=3D=3D=3D=3D
gcc needs libiconv
wget ftp://ftp.sunfreeware.com/pub/freeware/ ... -sol10-sp=
arc-local.gz
=C2=A0# gunzip libiconv-1.11-sol10-sparc-local.gz
=C2=A0# pkgadd -d libiconv-1.11-sol10-sparc-local
=3D=3D=3D=3DInstall Lib gd=3D=3D=3D=3D
Get the source form www.libgd.org
=C2=A0# wget http://www.libgd.org/releases/gd-2.0.35.tar.gz
=C2=A0# gunzip -dc gd-2.0.35.tar.gz | tar -xf -
=C2=A0# cd gd-2.0.35
=C2=A0# ./configure --prefix=3D/opt/libgd
=C2=A0...
=C2=A0# make
=C2=A0...
=C2=A0# make install
=C2=A0...
=3D=3D=3DBuild Nagios server=3D=3D=3D
get the nagios source from www.nagios.org
=C2=A0# gunzip -dc nagios-3.0.6.tar.gz | tar -xf -
=C2=A0# cd nagios-3.0.6
copy in the 'moded Makefile.in' and checkinstall.in
=C2=A0# cp /root/Makefile.in.nagios.moded Makefile.in
=C2=A0# ./configure --prefix=3D/opt/nagios-3.0.6 --with-nagios-user=3Dnagio=
s
--with-nagios-group=3Dnagios --with-gd-lib=3D/opt/libgd/lib
--with-gd-inc=3D/opt/libgd/include
=C2=A0# gmake pkgclean
=C2=A0# gmake all
=C2=A0# gmake pkgset
Diff Makefile.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
284a285,286
> SUN_OS_RELEASE=3D$(shell uname -r | cut -f2 -d. )
> SUN_PLATFORM=3D$(shell uname -p)
301a304
> =C2=A0 =C2=A0 =C2=A0 if [ -f checkinstall.in ] ; then cat checkinstall.in=
| sed 's/!SUN_PLATFORM!/$(SUN_PLATFORM)/g' >checkinstall; fi
311,312c314,315
../nagios.SPARC.pkg.tar.gz
---
> nagios.sun.pkg.tar.gz: pkg/nagios/pkgmap
> =C2=A0 =C2=A0 =C2=A0 cd $(PACKDIR) && tar -cf - nagios | gzip -9 -c > ../=
nagios-$(VERSION)-Sol$(SUN_OS_RELEASE)-$(SUN_PLATFORM).pkg.tar.gz
314c317,318
nagios.sun.pkg: pkg/nagios/pkgmap
> =C2=A0 =C2=A0 =C2=A0 pkgtrans -s $(PACKDIR) ../nagios-$(VERSION)-Sol$(SUN=
_OS_RELEASE)-$(SUN_PLATFORM).pkg nagios
315a320,323
> pkgsettar: nagios.sun.pkg.tar.gz
>
> pkgset: nagios.sun.pkg
>
317c325
=C2=A0 =C2=A0 =C2=A0 rm -rf pkg Prototype nagios-$(VERSION)-$(SUN_PLATFOR=
M).pkg.tar.gz
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
checkinstall.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
#!/bin/sh
#
expected_platform=3D"!SUN_PLATFORM!"
#
platform=3D`uname -p`
#
if [ ${platform} !=3D ${expected_platform} ]; then
=C2=A0 =C2=A0echo "\n\n\n\tThis package must be installed on a
${expected_platform} architecture\n"
=C2=A0 =C2=A0echo "\tAborting installation.\n\n\n"
=C2=A0 =C2=A0exit 1
fi
exit 0
=3D=3D=3D=3D=3D=3D=3D=3
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]