The goal of this project is the update of the legacy libnet.so to a newer version. This is difficult because the legacy version did not have a SONAME set and all existing packages using libnet directly require libnet.so, which is unfortunately incompatible with the newer 1.1.x versions. The idea is to build a new library and have the corresponding libnet.so pointing to the newer version including a sane SONAME in another directory /opt/csw/lib/libnet-new/. This allows linking to the newer version by adding -L/opt/csw/lib/libnet-new to the head of linker search pathes but keep libnet.so.1 in /opt/csw/lib confining ugly details to the build process. When building with GAR use
EXTRA_LDFLAGS = -L$(libdir)/libnet-new
Package layout
The layout of the packages could be considered "strange" or at least unusual:
CSWlibnet
This contains the legacy library only. The package name does not have a soname number appended.
s none /opt/csw/lib/libnet.so=libnet.so.1.0.2
f none /opt/csw/lib/libnet.so.1.0.2 0644 root bin
d none /opt/csw/share/doc/libnet 0755 root bin
f none /opt/csw/share/doc/libnet/license 0644 root bin
i checkpkg_override=checkpkg_override.CSWlibnet
CSWlibnet1
This package contains the runtime library only, no magic in here.
s none /opt/csw/lib/libnet.so.1=libnet.so.1.6.0
f none /opt/csw/lib/libnet.so.1.6.0 0755 root bin
s none /opt/csw/lib/sparcv9/libnet.so.1=libnet.so.1.6.0
f none /opt/csw/lib/sparcv9/libnet.so.1.6.0 0755 root bin
d none /opt/csw/share/doc/libnet1 0755 root bin
f none /opt/csw/share/doc/libnet1/license 0644 root bin
CSWlibnetdevel
The interesting part in the development package is the different implementation between the 32- and 64 bit libraries. As the legacy library was available as 32 bit only the development libnet.so has been relocated to libnet-new/ requiring the above mentioned linker flag. However, for 64 bit the standard location can be used and the linker flag is simply ignored there.
f none /opt/csw/bin/libnet-config 0755 root bin
f none /opt/csw/bin/sparcv9/libnet-config 0755 root bin
d none /opt/csw/include/libnet 0755 root bin
f none /opt/csw/include/libnet.h 0644 root bin
f none /opt/csw/include/libnet/libnet-asn1.h 0644 root bin
f none /opt/csw/include/libnet/libnet-functions.h 0644 root bin
f none /opt/csw/include/libnet/libnet-headers.h 0644 root bin
f none /opt/csw/include/libnet/libnet-macros.h 0644 root bin
f none /opt/csw/include/libnet/libnet-structures.h 0644 root bin
f none /opt/csw/include/libnet/libnet-types.h 0644 root bin
d none /opt/csw/lib/libnet-new 0755 root bin
s none /opt/csw/lib/libnet-new/libnet.so=../libnet.so.1
s none /opt/csw/lib/sparcv9/libnet.so=libnet.so.1.6.0
d none /opt/csw/share/checkpkg 0755 root bin
d none /opt/csw/share/checkpkg/overrides 0755 root bin
d none /opt/csw/share/doc/libnet_devel 0755 root bin
f none /opt/csw/share/doc/libnet_devel/license 0644 root bin
d none /opt/csw/share/man/man3 0755 root bin
f none /opt/csw/share/man/man3/libnet-functions.h.3 0644 root bin
f none /opt/csw/share/man/man3/libnet-macros.h.3 0644 root bin
f none /opt/csw/share/man/man3/libnet.h.3 0644 root bin