debian/0000755000000000000000000000000012164723152007171 5ustar debian/source/0000755000000000000000000000000012164657620010477 5ustar debian/source/format0000644000000000000000000000001412164656666011716 0ustar 3.0 (quilt) debian/control0000644000000000000000000000320612164720611010572 0ustar Source: oflib Section: libs Priority: extra Maintainer: Debian Mactel Uploaders: Nobuhiro Iwamatsu Build-Depends: debhelper (>= 9) Standards-Version: 3.9.4 Package: libofapi-dev Section: libdevel Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: libofapi0 (= ${binary:Version}), ${misc:Depends} Description: OpenFirmware device-tree parsing library [development files] oflib is a library designed to make the parsing of POWER and SPARC device-tree's (OpenFirmware) simple and fast. . It is useful for querying the hardware of the current system in applications for Apple, IBM and SUN machines. Package: libofapi-example Section: libdevel Architecture: all Depends: ${misc:Depends} Recommends: libofapi-dev (= ${binary:Version}) Breaks: libofapi-dev (<= 0git20070620-6) Description: OpenFirmware device-tree parsing library [example files] oflib is a library designed to make the parsing of POWER and SPARC device-tree's (OpenFirmware) simple and fast. . It is useful for querying the hardware of the current system in applications for Apple, IBM and SUN machines. . Example applications are included to show some of its capabilities. Package: libofapi0 Section: libs Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: OpenFirmware device-tree parsing library oflib is a library designed to make the parsing of POWER and SPARC device-tree's (OpenFirmware) simple and fast. . It is useful for querying the hardware of the current system in applications for Apple, IBM and SUN machines. debian/libofapi0.install0000644000000000000000000000002412164656666012441 0ustar usr/lib/*/lib*.so.* debian/copyright0000644000000000000000000000144712164660361011134 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: of-lib Source: http://git.sipsolutions.net/?p=of-lib.git;a=summary Files: * Copyright: Copyright (C) 2006, 2007 Alastair Poole License: GPL-2+ Files: debian/* Copyright: (C) 2007, Julien BLACHE (C) 2013, Nobuhiro Iwamatsu License: GPL-2+ License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . On Debian systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2' debian/rules0000755000000000000000000000041212164665161010253 0ustar #!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ override_dh_auto_clean: rm -rf lib/*.o libofapi.a libofapi.so.* override_dh_auto_install: dh_auto_install \ -- DESTDIR=$(CURDIR)/debian/tmp \ MULTIARCH_PATH=$(DEB_HOST_MULTIARCH) debian/libofapi-example.examples0000644000000000000000000000011012164717162014143 0ustar example/Makefile example/example.c example/ramtest.c example/soundbus.c debian/libofapi-dev.install0000644000000000000000000000006512164661564013133 0ustar usr/include/ofapi usr/lib/*/lib*.a usr/lib/*/lib*.so debian/compat0000644000000000000000000000000212164662375010400 0ustar 9 debian/changelog0000644000000000000000000000554112164720633011051 0ustar oflib (0git20070620-7) unstable; urgency=low * Update debian/control. - Bump Standard Version: 3.9.4 - Change Maintainer field and Add Uploaders field. (Closes: #688545) Maintainer: Debian Mactel Uploaders: Nobuhiro Iwamatsu - Update debhelper to 9. - Add libofapi-example package. This was separated from libofapi-dev. - Add "Breaks: libofapi-dev (<= 0git20070620-6)" to libofapi-example. - Add "Multi-Arch: same" to libofapi-dev. * Update debian/copyright, convert to DEP5. * Update debian/compat to 9. * Convert debian/rules to dh. * Enable hardening. - Update patches/Makefile_mods_debian.patch. -- Nobuhiro Iwamatsu Wed, 03 Jul 2013 08:15:11 +0900 oflib (0git20070620-6) unstable; urgency=low * Multiarch conversion. * debian/control: + Bump Standards-Version to 3.9.2 (no changes). + Bump debhelper build-dep to >= 8.1.3 for multiarch. + Add Pre-Depends: ${misc:Pre-Depends} to libofapi0. + Tag libofapi0 with Multi-Arch: same. * debian/rules: + Add DEB_HOST_MULTIARCH to make install invocation. * debian/*.install: + Adapt for multiarch. * debian/*.dirs: + Removed; unneeded. * debian/patches/Makefile_mods_debian.patch: + Take multiarch path into account. -- Julien BLACHE Mon, 13 Jun 2011 10:15:04 +0200 oflib (0git20070620-5) unstable; urgency=low * Switch to source format 3.0 (quilt). * debian/control: + Bump Standards-Version to 3.9.1 (no changes). + Add ${misc:Depends} to libofapi-dev. * debian/patches/fix_examples.patch: + Added; fix the soundbus example and enable it (closes: #609796). -- Julien BLACHE Wed, 12 Jan 2011 18:34:14 +0100 oflib (0git20070620-4) unstable; urgency=low * debian/control: + Bump Standards-Version to 3.7.3. -- Julien BLACHE Sat, 01 Mar 2008 16:38:47 +0100 oflib (0git20070620-3) unstable; urgency=low * Makefile: + Use $(MAKE) instead of make, needed for parallel builds. -- Julien BLACHE Tue, 04 Dec 2007 13:52:28 +0100 oflib (0git20070620-2) unstable; urgency=low * debian/rules: + Do not ignore errors from make clean. -- Julien BLACHE Thu, 02 Aug 2007 18:39:00 +0200 oflib (0git20070620-1) unstable; urgency=low * New snapshot. + Patches for the libofapi.so.0 soname merged upstream. * debian/control: + Rename library package to libofapi0. + Use ${binary:Version} instead of ${Source-Version}. * debian/copyright: + Updated upstream's email address. -- Julien BLACHE Wed, 20 Jun 2007 21:01:43 +0200 oflib (0git20070301-1) unstable; urgency=low * Initial release (Closes: #413022). -- Julien BLACHE Thu, 1 Mar 2007 20:31:31 +0100 debian/patches/0000755000000000000000000000000012164664740010627 5ustar debian/patches/series0000644000000000000000000000005612164656666012055 0ustar Makefile_mods_debian.patch fix_examples.patch debian/patches/fix_examples.patch0000644000000000000000000000240712164656666014347 0ustar Description: Fix oflib examples Fix the soundbus example, enable it and rewrite the Makefile in more generic way. Author: Daniel Kahn Gillmor Origin: vendor, http://bugs.debian.org/609796 Bug-Debian: http://bugs.debian.org/609796 Index: oflib-0git20070620/example/Makefile =================================================================== --- oflib-0git20070620.orig/example/Makefile 2007-06-20 20:03:56.000000000 +0200 +++ oflib-0git20070620/example/Makefile 2011-01-12 18:33:37.905016010 +0100 @@ -1,6 +1,9 @@ -default: - gcc -std=c99 -lofapi example.c -o example - gcc -std=c99 -lofapi ramtest.c -o ramtest +BINARIES=example ramtest soundbus +all: $(BINARIES) + +%: %.c + gcc -std=c99 -lofapi $< -o $@ clean: - rm -f ramtest - rm -f example + rm -f $(BINARIES) + +.PHONY: clean all Index: oflib-0git20070620/example/soundbus.c =================================================================== --- oflib-0git20070620.orig/example/soundbus.c 2007-03-01 20:36:26.000000000 +0100 +++ oflib-0git20070620/example/soundbus.c 2011-01-12 18:33:37.905016010 +0100 @@ -73,7 +73,7 @@ if(!property) return; - of_property_to_int(&layout_id, property, plen); + of_property_to_uint32(&layout_id, property, plen); printf("Layout ID: %d\n", layout_id); debian/patches/Makefile_mods_debian.patch0000644000000000000000000000350712164664740015716 0ustar Description: Makefile modifications for Debian builds Add a static library and rearrange some rules to better suit Debian packaging needs. Author: Julien BLACHE Index: oflib-0git20070620/Makefile =================================================================== --- oflib-0git20070620.orig/Makefile 2011-01-12 18:25:34.341016001 +0100 +++ oflib-0git20070620/Makefile 2011-06-13 10:19:32.242307929 +0200 @@ -1,27 +1,40 @@ -include_dir=/usr/local/include/ofapi +include_dir = $(DESTDIR)/usr/include/ofapi +lib_dir = $(DESTDIR)/usr/lib/$(MULTIARCH_PATH) LIBNAME = libofapi.so SONAME = $(LIBNAME).0 SOVERSION = $(SONAME).0.0 +CFLAGS += -g -Wall -O2 + default: - gcc -g -Wall -D_REENTRANT -DPIC -fpic -Wl,-soname -Wl,$(SONAME) lib/*.c -shared -o $(SOVERSION) + gcc $(CFLAGS) -D_REENTRANT -DPIC -fpic -Wl,-z,relro -Wl,-soname -Wl,$(SONAME) lib/*.c -shared -o $(SOVERSION) + + gcc $(CFLAGS) -c lib/of_externals.c -o lib/of_externals.o + gcc $(CFLAGS) -c lib/of_internals.c -o lib/of_internals.o + gcc $(CFLAGS) -c lib/of_standard.c -o lib/of_standard.o + + ar cru libofapi.a lib/*.o + ranlib libofapi.a install: - cp $(SOVERSION) /usr/local/lib - ln -s /usr/local/lib/$(SOVERSION) /usr/local/lib/$(SONAME) - ln -s /usr/local/lib/$(SOVERSION) /usr/local/lib/$(LIBNAME) - test -d "$(include_dir)" || mkdir "$(include_dir)" + mkdir -p $(lib_dir) + cp $(SOVERSION) $(lib_dir) + cp libofapi.a $(lib_dir) + ln -sf $(SOVERSION) $(lib_dir)/$(SONAME) + ln -sf $(SOVERSION) $(lib_dir)/$(LIBNAME) + + mkdir -p $(include_dir) cp lib/*.h $(include_dir) all: - make default - make install - make examples + $(MAKE) default + $(MAKE) install + $(MAKE) examples examples: - make -C example/ + $(MAKE) -C example/ clean: - make -C example/ clean - rm -f libofapi.so.* + $(MAKE) -C example/ clean + rm -f $(SOVERSION) lib/*.o libofapi.a