summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-09-28 11:32:41 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-09-28 11:32:41 +0400
commita3319e581b5bd18c65cb66a23ae201ad6456e3b9 (patch)
tree4eb141c44f052406055fdf52d29168a74c03903a
parent1ed09a087d13b482f654a42be2a6440838ef7001 (diff)
downloadillumos-packaging-a3319e581b5bd18c65cb66a23ae201ad6456e3b9.tar.gz
libmapid
-rw-r--r--libmapid/debian/README.source10
-rw-r--r--libmapid/debian/changelog5
-rw-r--r--libmapid/debian/compat1
-rw-r--r--libmapid/debian/control32
-rw-r--r--libmapid/debian/copyright26
-rw-r--r--libmapid/debian/libmapid1-dev.install2
-rw-r--r--libmapid/debian/libmapid1.install1
-rw-r--r--libmapid/debian/libmapid1.symbols6
-rw-r--r--libmapid/debian/patches/libmapid-libdir.patch17
-rw-r--r--libmapid/debian/patches/libmapid-mapid.c.patch13
-rw-r--r--libmapid/debian/patches/series2
-rwxr-xr-xlibmapid/debian/rules89
-rw-r--r--libmapid/debian/source/format1
13 files changed, 205 insertions, 0 deletions
diff --git a/libmapid/debian/README.source b/libmapid/debian/README.source
new file mode 100644
index 0000000..9988910
--- /dev/null
+++ b/libmapid/debian/README.source
@@ -0,0 +1,10 @@
+Real sources are in the package illumos-source-X.Y,
+where X and Y are numbers. Exact values of X and Y
+are set in Build-Depends field of debian/control as
+well as in the version string in debian/changelog,
+in a form of X.Y-1.
+
+To add a patch you need first to unpack files from
+illumos-source-X.Y using ./debian/rules unpack
+and, desirably, ./debian/rules patch
+
diff --git a/libmapid/debian/changelog b/libmapid/debian/changelog
new file mode 100644
index 0000000..8d51923
--- /dev/null
+++ b/libmapid/debian/changelog
@@ -0,0 +1,5 @@
+libmapid (2.10+1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Igor Pashev <pashev.igor@gmail.com> Sat, 28 Sep 2013 10:43:10 +0400
diff --git a/libmapid/debian/compat b/libmapid/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/libmapid/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/libmapid/debian/control b/libmapid/debian/control
new file mode 100644
index 0000000..c59833c
--- /dev/null
+++ b/libmapid/debian/control
@@ -0,0 +1,32 @@
+Source: libmapid
+Section: admin
+Priority: optional
+Maintainer: Igor Pashev <pashev.igor@gmail.com>
+Build-Depends:
+ illumos-source-2.10,
+ dh-illumos,
+ libscf1-dev,
+ quilt,
+ symlinks,
+Standards-Version: 3.9.3
+Homepage: https://www.illumos.org
+
+Package: libmapid1
+Section: libs
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Architecture: illumos-any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: NFS user and group id mapping library
+ This package contains libmapid1 mapidd library.
+
+Package: libmapid1-dev
+Section: libdevel
+Priority: optional
+Architecture: illumos-any
+Provides: libmapid-dev
+Depends: libmapid1 (= ${binary:Version}), ${misc:Depends},
+Description: NFS user and group id mapping library (development files)
+ This package contains the header files and symlinks needed
+ to compile applications that use libmapid1.
+
diff --git a/libmapid/debian/copyright b/libmapid/debian/copyright
new file mode 100644
index 0000000..fca073e
--- /dev/null
+++ b/libmapid/debian/copyright
@@ -0,0 +1,26 @@
+Files: debian/*
+Copyright: 2013, Igor Pashev <pashev.igor@gmail.com>
+License: WTFPL-2
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+ .
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+ .
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+ .
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+ .
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
+Files: *
+License: CDDL
+ Note that sources are not in this package but in the package
+ illumos-source-X.Y. Those sources are covered by Common Development
+ and Distribution License (CDDL).
+ .
+ On Dyson system, the full text of the CDDL license
+ can be found in the file `/usr/share/common-licenses/CDDL-1.0'.
+
diff --git a/libmapid/debian/libmapid1-dev.install b/libmapid/debian/libmapid1-dev.install
new file mode 100644
index 0000000..c9c6e1d
--- /dev/null
+++ b/libmapid/debian/libmapid1-dev.install
@@ -0,0 +1,2 @@
+usr/lib/*/libmapid.so
+usr/include/nfs/mapid.h
diff --git a/libmapid/debian/libmapid1.install b/libmapid/debian/libmapid1.install
new file mode 100644
index 0000000..f3d0bc4
--- /dev/null
+++ b/libmapid/debian/libmapid1.install
@@ -0,0 +1 @@
+usr/lib/*/libmapid.so.1
diff --git a/libmapid/debian/libmapid1.symbols b/libmapid/debian/libmapid1.symbols
new file mode 100644
index 0000000..2b33aae
--- /dev/null
+++ b/libmapid/debian/libmapid1.symbols
@@ -0,0 +1,6 @@
+libmapid.so.1 libmapid1 #MINVER#
+ SUNWprivate_1.1@SUNWprivate_1.1 2.10
+ mapid_derive_domain@SUNWprivate_1.1 2.10
+ mapid_get_domain@SUNWprivate_1.1 2.10
+ mapid_reeval_domain@SUNWprivate_1.1 2.10
+ mapid_stdchk_domain@SUNWprivate_1.1 2.10
diff --git a/libmapid/debian/patches/libmapid-libdir.patch b/libmapid/debian/patches/libmapid-libdir.patch
new file mode 100644
index 0000000..9a660f6
--- /dev/null
+++ b/libmapid/debian/patches/libmapid-libdir.patch
@@ -0,0 +1,17 @@
+Index: libmapid/usr/src/lib/libmapid/Makefile.com
+===================================================================
+--- libmapid.orig/usr/src/lib/libmapid/Makefile.com 2012-10-08 04:25:41.000000000 +0400
++++ libmapid/usr/src/lib/libmapid/Makefile.com 2013-09-28 10:46:49.073663681 +0400
+@@ -36,12 +36,6 @@
+ LIBS = $(DYNLIB) $(LINTLIB)
+
+ #
+-# This library will be installed w/all other nfs
+-# binaries in /usr/lib/nfs, so define it as such.
+-#
+-ROOTLIBDIR = $(ROOT)/usr/lib/nfs
+-
+-#
+ # SRCS is defined to be $(OBJECTS:%.o=$(SRCDIR)/%.c)
+ #
+ SRCDIR = ../common
diff --git a/libmapid/debian/patches/libmapid-mapid.c.patch b/libmapid/debian/patches/libmapid-mapid.c.patch
new file mode 100644
index 0000000..a52b8b2
--- /dev/null
+++ b/libmapid/debian/patches/libmapid-mapid.c.patch
@@ -0,0 +1,13 @@
+Index: libmapid/usr/src/lib/libmapid/common/mapid.c
+===================================================================
+--- libmapid.orig/usr/src/lib/libmapid/common/mapid.c 2012-10-08 04:25:41.000000000 +0400
++++ libmapid/usr/src/lib/libmapid/common/mapid.c 2013-09-28 10:45:51.722541346 +0400
+@@ -959,7 +959,7 @@
+ bzero(value, NS_MAXCDNAME);
+ ret = nfs_smf_get_prop("nfsmapid_domain", value, DEFAULT_INSTANCE,
+ SCF_TYPE_ASTRING, NFSMAPID, &bufsz);
+- if (ret == SA_OK && *value != NULL) {
++ if (ret == SA_OK && *value != 0) {
+ char *dp = NULL;
+ #ifdef DEBUG
+ char *whoami = "get_nfs_domain";
diff --git a/libmapid/debian/patches/series b/libmapid/debian/patches/series
new file mode 100644
index 0000000..ebaf5d6
--- /dev/null
+++ b/libmapid/debian/patches/series
@@ -0,0 +1,2 @@
+libmapid-mapid.c.patch
+libmapid-libdir.patch
diff --git a/libmapid/debian/rules b/libmapid/debian/rules
new file mode 100755
index 0000000..8396914
--- /dev/null
+++ b/libmapid/debian/rules
@@ -0,0 +1,89 @@
+#!/usr/bin/make -f
+
+include /usr/share/dpkg/architecture.mk
+export DH_VERBOSE = 1
+
+# libs having "install_h" target to install headers:
+libs_headers := \
+libmapid
+
+# All libraries to build and to package.
+# Order is important:
+libs := $(libs_headers) \
+
+
+unpack: unpack-stamp
+unpack-stamp:
+ dh_testdir
+ dh_illumos_gate --build \
+ $(libs:%=usr/src/lib/%) \
+ usr/src/cmd/fs.d/nfs/lib/smfcfg.h \
+ usr/src/cmd/fs.d/nfs/lib/smfcfg.c \
+
+
+ # libmapid is 32-bit only in illumos, we build it with --native
+ echo 'export ROOTFS_LIBDIR=$$ROOT/usr/lib/$(DEB_HOST_MULTIARCH)' >> usr/env.sh
+ echo 'export ROOTLIBDIR=$$ROOT/usr/lib/$(DEB_HOST_MULTIARCH)' >> usr/env.sh
+
+ # Not used and buggy:
+ echo > usr/src/Makefile.msg.targ
+ touch $@
+
+patch: patch-stamp
+patch-stamp: unpack-stamp
+ dh_testdir
+ [ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
+ touch $@
+
+unpatch:
+ dh_testdir
+ [ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt pop -a -f || test $$? = 2
+ rm -f patch-stamp
+
+dirs-stamp:
+ . usr/env.sh; mkdir -p \
+ debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \
+ debian/tmp/usr/include/nfs
+ touch $@
+
+headers-stamp: patch-stamp dirs-stamp
+ dh_illumos_make $(libs_headers:%=usr/src/lib/%) -t install_h
+ touch $@
+
+install install install-arch install-indep: install-stamp
+install-stamp: build-stamp
+ touch $@
+
+build build-arch build-indep: build-stamp
+build-stamp: patch-stamp dirs-stamp headers-stamp
+ dh_illumos_make --native $(libs:%=usr/src/lib/%)
+ touch $@
+
+binary binary-arch binary-indep: binary-stamp
+binary-stamp: install-stamp
+ dh_testdir
+ dh_testroot
+ dh_installdirs
+ dh_install --fail-missing
+ dh_installman
+ dh_installdocs
+ dh_installexamples
+ dh_installchangelogs
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs -- -c4
+ dh_installdeb
+ dh_shlibdeps
+ dh_strip
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+ touch $@
+
+clean: unpatch
+ dh_testdir
+ dh_testroot
+ dh_clean
+ rm -rf usr .pc
+
diff --git a/libmapid/debian/source/format b/libmapid/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/libmapid/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)