...
 
Commits (3)
  • felix s's avatar
    rearrange dependencies a bit more · 2da57678
    felix s authored
    following the discussion on pkg-electronics-devel. now gnucap
    recommends the plugins and the plugins suggest gnucap.
    
    rationale:
    
    - "Recommend" is sufficiently strong in pulling in the plugins whenever
      somebody installs gnucap.
    - gnucap provides one way to make use of the plugins. any other program
      that links to libgnucap could do that. no need to suggest the
      latter (esp: not packaged yet).
    2da57678
  • felix s's avatar
    an experimental pkg-config wrapper · 0828e661
    felix s authored
    gnucap extension build systems call gnucap-conf. upstream does not use
    pkgconfig in order to avoid dependencies.
    
    Fixing multi-arch (e.g. on debian) is achieved by wrapping pkgconfig.
    - repurpose gnucap.conf as a .pc file
      - install accordingly
      - add a footer
    - forward queries to pkg-config in gnucap-conf
    - move gnucap-conf to gnucap-common (arch:all)
    0828e661
  • felix s's avatar
    polish debian/README.Debian · b16cdd93
    felix s authored
    b16cdd93
......@@ -15,21 +15,23 @@ but if it does, will move to libgnucap.so.1.
gnucap-default-plugins0 contains the default plugins. these are installed into
/usr/lib/<multiarch>/gnucap0/. The "0" indicates the relation to libgnucap0.
This is the library, these plugins have been tested with. libgnucap loads
plugins from the path read from the environment variable GNUCAP_PLUGPATH (colon
separated, first wins, like PATH).
This is the library, these plugins have been tested with. In the past, plugins
have been forward compatible. libgnucap provides a plugin loader, it loads from
the path specified in the environment variable GNUCAP_PLUGPATH (colon
separated, first wins, like PATH, PYTHONPATH etc.).
/usr/bin/gnucap sets the GNUCAP_PLUGPATH environment to
/usr/lib/<multiarch>/gnucap0, unless otherwise specified. This is where
further packages are expected to install plugins to.
/usr/lib/<multiarch>/gnucap0, if empty. This is where further packages are
expected to install plugins to. Other programs are expected to query
"gnucap-conf --pkglibdir" at configure time, hardwire that in a similar way,
and set the environment accordingly.
(not yet, currently part of the gnucap package..)
The gnucap-devel package provides the files necessary to compile plugins.
Plugins can be compiled upon loading from within libgnucap, through dispatched
commands.
gnucap-common contains some architecture independent files, headers, examples
and (not yet:) pkg-config wrapper.
and a pkg-config wrapper, /usr/bin/gnucap-conf.
The libgnucap-dev package provides the necessary files to build/link programs
similar to /usr/bin/gnucap.
......
......@@ -21,11 +21,14 @@ gnucap (1:0.36~20171003-1) unstable; urgency=medium
binary plugins should also be installed into this directory. The default
command for loading plugins uses the GNUCAP_PLUGPATH environment
variable to locate plugins, a colon separated list of paths.
* gnucap-common package (Closes: #693267)
The headers are required, if plugins need to be compiled from within a
gnucap session, also for the purpose of libgnucap-dev, above. Further, these
headers are architecture independent. Hence this additional package.
* gnucap-devel package
This package provides the additional arch dependent infrastructure to build plugins e.g.
from within a gnucap session; this is currently implemented with pkgconfig
called from /usr/bin/gnucap-conf in gnucap-common.
None of the functionality supplied was present in previous packages.
* gnucap-common package (Closes: #693267)
Contains the headers required for the purpose of gnucap-devel and
libgnucap-dev, above. This package is architecture independent.
* man pages for /usr/bin/gnucap and /usr/bin/gnucap-{conf,modelgen}. The
upstream project makes no attempt in providing these, hence they are
maintained here.
......
......@@ -18,6 +18,7 @@ Architecture: any
Multi-Arch: same
Section: libs
Depends: ${misc:Depends}, ${shlibs:Depends}
Recommends: gnucap-devel
Description: GNU Circuit Analysis package, the library
GNUCAP is a general purpose circuit simulator. It performs nonlinear
dc and transient analyses, Fourier analysis, and ac analysis
......@@ -28,8 +29,8 @@ Description: GNU Circuit Analysis package, the library
Package: gnucap
Architecture: any
Depends: gnucap-default-plugins0, ${misc:Depends}, ${shlibs:Depends}
Recommends: gnucap-common
Depends: ${misc:Depends}, ${shlibs:Depends}
Recommends: gnucap-default-plugins0
Description: GNU Circuit Analysis package, main executable
GNUCAP is a general purpose circuit simulator. It performs nonlinear
dc and transient analyses, Fourier analysis, and ac analysis
......@@ -41,7 +42,6 @@ Description: GNU Circuit Analysis package, main executable
Package: gnucap-common
Architecture: all
Depends: ${misc:Depends}
Suggests: gnucap
Recommends: c++-compiler
Description: GNU Circuit Analysis package, development headers
GNUCAP is a general purpose circuit simulator. It performs nonlinear
......@@ -51,13 +51,25 @@ Description: GNU Circuit Analysis package, development headers
.
This package contains the headers required to build plugins.
Package: gnucap-devel
Architecture: any
Depends: ${misc:Depends}, gnucap-common
Suggests: gnucap
Description: GNU Circuit Analysis package, pkgconfig
GNUCAP is a general purpose circuit simulator. It performs nonlinear
dc and transient analyses, Fourier analysis, and ac analysis
linearized at an operating point. It is fully interactive and
command driven. It can also be run in batch mode or as a server.
.
This package contains arch dependent files required to build plugins.
Package: libgnucap-dev
Architecture: any
Section: libdevel
Depends: gnucap-common (= ${source:Version}),
libgnucap0 (= ${binary:Version}),
${misc:Depends}
Description: GNU Circuit Analysis package
Description: GNU Circuit Analysis package, development library
GNUCAP is a general purpose circuit simulator. It performs nonlinear
dc and transient analyses, Fourier analysis, and ac analysis
linearized at an operating point. It is fully interactive and
......@@ -69,6 +81,7 @@ Package: gnucap-default-plugins0
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends}, ${shlibs:Depends}
Suggests: gnucap
Description: GNU Circuit Analysis package, default plugins
GNUCAP is a general purpose circuit simulator. It performs nonlinear
dc and transient analyses, Fourier analysis, and ac analysis
......@@ -78,6 +91,6 @@ Description: GNU Circuit Analysis package, default plugins
This package contains the default plugins.
# Package: gnucap-src
# Depends: c++-compiler, gnucap-dev, make?
# Depends: c++-compiler, gnucap-devel, make?
# This package contains the default plugins as raw source, more or less
# under construction.
usr/include/gnucap/*.h
usr/include/gnucap/spice-wrapper.cc
debian/gnucap-conf /usr/bin
#!/bin/sh
# wrap to pkgconfig, make use of pkgconfig
# this is currently debian specific
pkgname=gnucap_
case $1 in
--cppflags)
pkg-config $pkgname --cflags-only-I
;;
--cxxflags)
pkg-config $pkgname --variable=CXXFLAGS
;;
--cxx)
pkg-config $pkgname --variable=CXX
;;
--ldflags)
pkg-config $pkgname --libs-only-L
;;
--includedir)
pkg-config $pkgname --variable=pkgincludedir
;;
--pkglibdir)
pkg-config $pkgname --variable=pkglibdir
;;
--libdir)
pkg-config $pkgname --variable=libdir
;;
--libs)
pkg-config $pkgname --variable=LIBS
;;
--plugin-libs)
:
;;
--exec-prefix)
pkg-config $pkgname --variable=exec_prefix
;;
--data)
pkg-config $pkgname --variable=datarootdir
;;
--sysconfdir)
pkg-config $pkgname --variable=sysconfdir
;;
*)
echo $0 --cppflags
echo $0 --cxxflags
echo $0 --cxx
echo $0 --ldflags
echo $0 --includedir
echo $0 --pkglibdir
echo $0 --pkglibs
echo $0 --libdir
echo $0 --libs
echo $0 --exec-prefix
echo $0 --data
echo $0 --sysconfdir
esac
/usr/lib/*/pkgconfig/*.pc
usr/lib/*/*/gnucap.conf
usr/bin/gnucap*
usr/bin/gnucap
usr/bin/gnucap-modelgen
usr/share/doc/gnucap/examples/*
usr/lib/*/*/gnucap.conf
pkgincludedir=${includedir}/gnucap
Name: gnucap
Version: 0
Description: The GNU circuit analysis package
Libs: -L${libdir}
Cflags: -I${pkgincludedir}
......@@ -25,6 +25,7 @@ LN_S = ln -sf
libdir = /usr/lib/$(DEB_HOST_MULTIARCH)
pkglibdir = ${libdir}/gnucap${SOVERSION}
pcdir = ${libdir}/pkgconfig
%:
dh $@
......@@ -99,6 +100,13 @@ override_dh_auto_install:
mv $(CURDIR)/debian/tmp/usr/etc/gnucap.conf \
$(CURDIR)/debian/tmp/${pkglibdir}/gnucap.conf
# pkg-config
mkdir -p $(CURDIR)/debian/tmp/${pcdir}
cp $(CURDIR)/debian/tmp/${pkglibdir}/gnucap.conf \
$(CURDIR)/debian/tmp/${pcdir}/gnucap_.pc
cat ${CURDIR}/debian/gnucap.pc.foot >> $(CURDIR)/debian/tmp/${pcdir}/gnucap_.pc
# mv $(CURDIR)/debian/tmp/usr/bin/gnucap-conf $(CURDIR)/debian/tmp/${pkglibdir}/
mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/gnucap/examples
......