[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Best practise for a drop-in replacement of a non-free package



Hi all,

I intend to package the "giza" library [1] that is largely a replacement
of the pgplot library that is in Debian non-free. Pgplot is an
all-in-one package that contains among others the following libraries
and header file (no pkgconfig file here):

/usr/include/cpgplot.h
/usr/lib/libcpgplot.a
/usr/lib/libcpgplot.so
/usr/lib/libcpgplot.so.5
/usr/lib/libcpgplot.so.5.2.2

(also libpgplot.* which follows the same scheme; everything below also
applies to libpgplot)

The giza package originally builds the following libraries, header file,
and pkgconfig file:

/usr/include/cpgplot.h
/usr/lib/<arch>/libgiza.a
/usr/lib/<arch>/libgiza.so
/usr/lib/<arch>/libgiza.so.0
/usr/lib/<arch>/libgiza.so.0.1.4
/usr/lib/<arch>/libcpgplot.a
/usr/lib/<arch>/libcpgplot.so
/usr/lib/<arch>/libcpgplot.so.0
/usr/lib/<arch>/libcpgplot.so.0.0.0
/usr/lib/<arch>/pkgconfig/cpgplot.pc

My question is now how to create the packages. As far as I understand
the policy, there are no rules wrt. conflicts to non-free, right? I
would now just rename the libcpgplot.* to libcpgplot_giza.*, and then
create the following packages:

* giza-dev (Conflicts: pgplot)
/usr/include/cpgplot.h
/usr/lib/<arch>/libgiza.a
/usr/lib/<arch>/libgiza.so
/usr/lib/<arch>/libcpgplot_giza.a
/usr/lib/<arch>/libcpgplot_giza.so
/usr/lib/<arch>/pkgconfig/cpgplot.pc

* libgiza0
/usr/lib/<arch>/libgiza.so.0
/usr/lib/<arch>/libgiza.so.0.1.4

* libcpgplot-giza0
/usr/lib/<arch>/libcpgplot_giza.so.0
/usr/lib/<arch>/libcpgplot_giza.so.0.0.0

This way, programs *using* the non-free pgplot could coexist with
programs using the giza implementation, but not the development
version. Packages that need pgplot for compilation and using pkgconfig
can just depend on giza-dev; if they don't use pkgconfig the linker flag
should be changed to -lcpgplot_giza. However, giza-dev and pgplot cannot
coexist. 

Is this the optimal solution or shall I change something?

If you want to review the package, see [2]

Best regards

Ole

[1] https://bugs.debian.org/649602
[2] https://anonscm.debian.org/cgit/debian-astro/packages/giza.git


Reply to: