Dear NUT developers, I have converted NUT's build system to Automake/Libtool. Right now, the new build system is contained in the "automake" branch, at: ssh://svn.debian.org/svn/nut/branches/automake I plan to merge this into the main branch after a period of testing, if there are no objections. Here are some highlights: * automatic dependency tracking: no more need to do this statically with "gendb" and similar * flexible multi-platform library support: libupsclient is now built and installed as a static and/or dynamic library, depending on what the target platform supports. * new maintainer targets: "make dist" to build a source distribution, "make distcheck" to check that it compiles and installs correctly. There are also several other useful standardized targets, such as "uninstall", "dist-bzip2", "install-strip", "distclean", "maintainer-clean", etc. * support for separate build and read-only source directory: For example, try cd /tmp/build ${NUT_SOURCE}/configure --srcdir=${NUT_SOURCE} make * as before, installation is relocatable via "make DESTDIR=${DIR} install" * I reworked and simplified the configuration of optional features. Instead of specialized "make" targets like "build-usb", "build-lib", "install-lib", etc, features are now specified via configuration options such as "--with-usb", "--with-lib", and are automatically built/installed if selected. Dummy targets are provided for backward "compatibility" (many of them just print an error message explaining the new way of doing things). * Some filenames have been standardized; I renamed CHANGES and CREDITS to "ChangeLog" and "AUTHORS", respectively, as this used by most other packages (and all GNU packages). * Files that are generated by aclocal, autoheader, autoconf, automake, and ./configure have been removed from SVN. Upon checking out a fresh copy from SVN, populate it is follows: aclocal -I m4 autoconf autoheader automake If you have "autoreconf", you can do all of this in a single step: autoreconf -v Of course, any distribution made by "make dist" already contains the necessary files. * There is no more include/version.h. The package version is now defined in a single place: at the top of configure.in. * I fixed numerous bugs in configure.in and in the old Makefiles; for example, several man pages did not get installed. * I updated the documentation (INSTALL, README, docs/configure.txt, etc) to reflect the new build system. I found two files with which I was not sure what to do. They are: data/evolution500.dev - what is this for? drivers/Doxyfile - this seems to belong to Charles. Perhaps related to auto-generating documentation for the tripplite_usb driver? It probably should go in another directory, and with a better name. Enjoy, and let me know of any bugs/problems! -- Peter
On 10/15/06, Peter Selinger <selinger@mathstat.dal.ca> wrote:> * Files that are generated by aclocal, autoheader, autoconf, automake, > and ./configure have been removed from SVN. Upon checking out a > fresh copy from SVN, populate it is follows: > > aclocal -I m4 > autoconf > autoheader > automake > > If you have "autoreconf", you can do all of this in a single step: > > autoreconf -vI tried this on my Mac, and it looks like 'compile' in the root of the branch is a symlink to /usr/share/automake-1.9/compile (which doesn't exist; there is /usr/share/automake-1.6 and /sw/share/automake-1.9). Oddly enough, this doesn't cause a problem until automake descends into clients: autoreconf: running: automake --no-force clients/Makefile.am: required file `./compile' not found I fixed this locally with 'automake --add-missing', but I'm not sure how to tell autoreconf to pass that option to automake. Maybe we should just ship a copy of 'compile' in SVN? -- - Charles Lepple
On 10/15/06, Peter Selinger <selinger@mathstat.dal.ca> wrote:> By the way, with the new "make distcheck" mechanism, it should be > relatively easy to automatically generate a "daily tarball", or > perhaps to trigger such a tarball to be build after each commit. Do > you know how to hook into SVN to trigger such a post-commit action? > (Moreover, if "make distcheck" fails, then a bug has been immediately > discovered).Another hitch is that we would need both Net-SNMP and libusb installed on whatever machine runs "make distcheck". I can install it on the box that does Trac, but I'm not sure about svn.debian.org. -- - Charles Lepple
Hi Peter, first of all, kudos for that very good job ;-) 2006/10/16, Peter Selinger <selinger@mathstat.dal.ca>:> Dear NUT developers, > > I have converted NUT's build system to Automake/Libtool. Right now, > the new build system is contained in the "automake" branch, at: > > ssh://svn.debian.org/svn/nut/branches/automake > > I plan to merge this into the main branch after a period of testing, > if there are no objections. > > Here are some highlights: > > * automatic dependency tracking: no more need to do this statically > with "gendb" and similar > > * flexible multi-platform library support: libupsclient is now built > and installed as a static and/or dynamic library, depending on what > the target platform supports. > > * new maintainer targets: "make dist" to build a source distribution, > "make distcheck" to check that it compiles and installs correctly. > There are also several other useful standardized targets, such as > "uninstall", "dist-bzip2", "install-strip", "distclean", > "maintainer-clean", etc. > > * support for separate build and read-only source directory: For example, try > cd /tmp/build > ${NUT_SOURCE}/configure --srcdir=${NUT_SOURCE} > make > > * as before, installation is relocatable via "make DESTDIR=${DIR} install" > > * I reworked and simplified the configuration of optional features. > Instead of specialized "make" targets like "build-usb", "build-lib", > "install-lib", etc, features are now specified via configuration > options such as "--with-usb", "--with-lib", and are automatically > built/installed if selected. Dummy targets are provided for backward > "compatibility" (many of them just print an error message explaining > the new way of doing things). > > * Some filenames have been standardized; I renamed CHANGES and CREDITS > to "ChangeLog" and "AUTHORS", respectively, as this used by most > other packages (and all GNU packages). > > * Files that are generated by aclocal, autoheader, autoconf, automake, > and ./configure have been removed from SVN. Upon checking out a > fresh copy from SVN, populate it is follows: > > aclocal -I m4 > autoconf > autoheader > automake > > If you have "autoreconf", you can do all of this in a single step: > > autoreconf -vthe above is generally addressed by an autogen.sh script, which is still to be run after a checkout, but which does everything for us...> Of course, any distribution made by "make dist" already contains the > necessary files. > > * There is no more include/version.h. The package version is now > defined in a single place: at the top of configure.in. > > * I fixed numerous bugs in configure.in and in the old Makefiles; for > example, several man pages did not get installed. > > * I updated the documentation (INSTALL, README, docs/configure.txt, > etc) to reflect the new build system. > > > I found two files with which I was not sure what to do. They are: > > data/evolution500.dev - what is this for?this is for the new dummy driver (dummy-ups, replacing dummycons). this is basically, as explained in dummy-ups.8, an upsc dump which can be loaded by the driver, and is shipped as an example.> drivers/Doxyfile - this seems to belong to Charles. Perhaps > related to auto-generating documentation > for the tripplite_usb driver? It probably > should go in another directory, and with > a better name. > > Enjoy, and let me know of any bugs/problems! -- PeterI still have to test it, but it's a great step for the nut. I just wonder how you addressed the drivers dir specifics?! Arnaud -- Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://people.debian.org/~aquette/ OpenSource Developer - http://arnaud.quette.free.fr/
2006/10/16, Peter Selinger <selinger@mathstat.dal.ca>:> ... > I plan to merge this into the main branch after a period of testing, > if there are no objections.according to our discussion about the 2.0.5 release (simply a release of the current trunk), it would be better to release 2.0.5 before that merge (and the ones I mentionned before, the new conf and HAL branches...) Arnaud -- Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://people.debian.org/~aquette/ OpenSource Developer - http://arnaud.quette.free.fr/
Arnaud Quette wrote:> > Hi Peter, > > first of all, kudos for that very good job ;-)Thanks.> > I found two files with which I was not sure what to do. They are: > > > > data/evolution500.dev - what is this for? > > this is for the new dummy driver (dummy-ups, replacing dummycons). > this is basically, as explained in dummy-ups.8, an upsc dump which can > be loaded by the driver, and is shipped as an example.I see. According to the man page, the driver looks for such files in ${sysconfdir}. So should this file be installed? Currently, it is distributed, but not installed.> I just wonder how you addressed the drivers dir specifics?!This is documented in docs/configure.txt. Essentially, there are four options for configuring which drivers will be built, and one option for configuring where they will be installed: --with-serial Build and install the serial drivers (default: yes) --with-usb Build and install the USB drivers (default: no) --with-snmp Build and install the SNMP drivers (default: no) --with-drivers=<driver>,<driver>,... Specify exactly which driver or drivers to build and install (this works for serial, usb, and snmp drivers), i.e., it overrides the preceding three options. --with-drvpath=PATH The UPS drivers will be installed to this path. By default they install to "bin" under the prefix, giving a default path of /usr/local/ups/bin. The "driverpath" global directive in the ups.conf file overrides this at run time. This mechanism is the same as under the old build system, except that the --with-serial, --with-usb, and --with-snmp options are new. -- Peter