summaryrefslogtreecommitdiff
path: root/extras/volume_id
diff options
context:
space:
mode:
Diffstat (limited to 'extras/volume_id')
-rw-r--r--extras/volume_id/Makefile.am33
-rw-r--r--extras/volume_id/lib/Makefile.am69
-rw-r--r--extras/volume_id/lib/exported_symbols119
-rw-r--r--extras/volume_id/lib/libvolume_id.pc.in10
-rw-r--r--extras/volume_id/vol_id.c2
5 files changed, 168 insertions, 65 deletions
diff --git a/extras/volume_id/Makefile.am b/extras/volume_id/Makefile.am
new file mode 100644
index 0000000000..bc1b262f27
--- /dev/null
+++ b/extras/volume_id/Makefile.am
@@ -0,0 +1,33 @@
+SUBDIRS = \
+ lib
+
+udevhomedir = $(udev_prefix)/lib/udev
+udevhome_PROGRAMS = \
+ vol_id
+
+AM_CPPFLAGS = \
+ -DSYSCONFDIR=\""$(sysconfdir)"\" \
+ -DUDEV_PREFIX=\""$(udev_prefix)"\"
+
+vol_id_SOURCES = \
+ vol_id.c \
+ ../../udev/udev_sysdeps.c \
+ ../../udev/udev_utils.c \
+ ../../udev/udev_utils_string.c
+
+vol_id_LDADD = \
+ lib/libvolume_id.la
+
+dist_man_MANS = \
+ vol_id.8
+
+EXTRA_DIST = \
+ vol_id.xml
+
+%.7 %.8 : %.xml
+ $(XSLTPROC) -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+distclean-local:
+ rm -f Makefile.in
+ rm -f $(dist_man_MANS)
+
diff --git a/extras/volume_id/lib/Makefile.am b/extras/volume_id/lib/Makefile.am
new file mode 100644
index 0000000000..de37f9e8b8
--- /dev/null
+++ b/extras/volume_id/lib/Makefile.am
@@ -0,0 +1,69 @@
+rootlibdir = $(exec_prefix)/$(libdir_name)
+rootlib_LTLIBRARIES = \
+ libvolume_id.la
+
+include_HEADERS =\
+ libvolume_id.h
+
+libvolume_id_la_SOURCES =\
+ ext.c \
+ fat.c \
+ hfs.c \
+ highpoint.c \
+ isw_raid.c \
+ lsi_raid.c \
+ via_raid.c \
+ silicon_raid.c \
+ nvidia_raid.c \
+ promise_raid.c \
+ adaptec_raid.c \
+ jmicron_raid.c \
+ ddf_raid.c \
+ iso9660.c \
+ jfs.c \
+ linux_raid.c \
+ linux_swap.c \
+ lvm.c \
+ ntfs.c \
+ reiserfs.c \
+ udf.c \
+ ufs.c \
+ xfs.c \
+ cramfs.c \
+ hpfs.c \
+ romfs.c \
+ sysv.c \
+ minix.c \
+ gfs.c \
+ luks.c \
+ ocfs.c \
+ vxfs.c \
+ squashfs.c \
+ netware.c \
+ oracleasm.c \
+ volume_id.c \
+ util.h \
+ util.c
+
+libvolume_id_la_LDFLAGS = \
+ -version-info $(VOLID_LT_CURRENT):$(VOLID_LT_REVISION):$(VOLID_LT_AGE) \
+ -export-symbols $(top_srcdir)/extras/volume_id/lib/exported_symbols
+
+# move devel files to $(prefix)$(libdir_name) if needed
+install-data-hook:
+ rm $(DESTDIR)$(rootlibdir)/libvolume_id.la
+ if test "$(prefix)" != "$(exec_prefix)"; then \
+ rm $(DESTDIR)$(rootlibdir)/libvolume_id.so; \
+ mkdir -p $(DESTDIR)$(prefix)/$(libdir_name); \
+ ln -sf $(rootlibdir)/libvolume_id.so.$(VOLID_LT_CURRENT).$(VOLID_LT_AGE).$(VOLID_LT_REVISION) \
+ $(DESTDIR)$(prefix)/$(libdir_name)/libvolume_id.so; \
+ fi
+
+EXTRA_DIST = \
+ exported_symbols
+
+pkgconfigdir = $(prefix)/$(libdir_name)/pkgconfig
+pkgconfig_DATA = libvolume_id.pc
+
+distclean-local:
+ rm -f Makefile.in
diff --git a/extras/volume_id/lib/exported_symbols b/extras/volume_id/lib/exported_symbols
index 05b6e52bc4..55b0265825 100644
--- a/extras/volume_id/lib/exported_symbols
+++ b/extras/volume_id/lib/exported_symbols
@@ -1,64 +1,55 @@
-{ global:
- volume_id_log_fn;
-
- volume_id_get_label;
- volume_id_get_label_raw;
- volume_id_get_uuid;
- volume_id_get_uuid_raw;
- volume_id_get_usage;
- volume_id_get_type;
- volume_id_get_type_version;
-
- volume_id_open_fd;
- volume_id_close;
- volume_id_probe_all;
- volume_id_probe_filesystem;
- volume_id_probe_raid;
- volume_id_all_probers;
- volume_id_get_prober_by_type;
- volume_id_encode_string;
-
- volume_id_open_node;
-
- volume_id_probe_linux_swap;
- volume_id_probe_luks;
- volume_id_probe_cramfs;
- volume_id_probe_ext;
- volume_id_probe_vfat;
- volume_id_probe_hfs_hfsplus;
- volume_id_probe_hpfs;
- volume_id_probe_iso9660;
- volume_id_probe_jfs;
- volume_id_probe_minix;
- volume_id_probe_ntfs;
- volume_id_probe_ocfs1;
- volume_id_probe_ocfs2;
- volume_id_probe_reiserfs;
- volume_id_probe_romfs;
- volume_id_probe_sysv;
- volume_id_probe_udf;
- volume_id_probe_ufs;
- volume_id_probe_vxfs;
- volume_id_probe_xfs;
- volume_id_probe_squashfs;
- volume_id_probe_netware;
- volume_id_probe_gfs;
- volume_id_probe_gfs2;
-
- volume_id_probe_linux_raid;
- volume_id_probe_lvm1;
- volume_id_probe_lvm2;
- volume_id_probe_ddf_raid;
- volume_id_probe_intel_software_raid;
- volume_id_probe_highpoint_37x_raid;
- volume_id_probe_highpoint_45x_raid;
- volume_id_probe_lsi_mega_raid;
- volume_id_probe_nvidia_raid;
- volume_id_probe_promise_fasttrack_raid;
- volume_id_probe_silicon_medley_raid;
- volume_id_probe_via_raid;
- volume_id_probe_adaptec_raid;
- volume_id_probe_jmicron_raid;
-local:
- *;
-};
+volume_id_log_fn
+volume_id_get_label
+volume_id_get_label_raw
+volume_id_get_uuid
+volume_id_get_uuid_raw
+volume_id_get_usage
+volume_id_get_type
+volume_id_get_type_version
+volume_id_open_fd
+volume_id_close
+volume_id_probe_all
+volume_id_probe_filesystem
+volume_id_probe_raid
+volume_id_all_probers
+volume_id_get_prober_by_type
+volume_id_encode_string
+volume_id_open_node
+volume_id_probe_linux_swap
+volume_id_probe_luks
+volume_id_probe_cramfs
+volume_id_probe_ext
+volume_id_probe_vfat
+volume_id_probe_hfs_hfsplus
+volume_id_probe_hpfs
+volume_id_probe_iso9660
+volume_id_probe_jfs
+volume_id_probe_minix
+volume_id_probe_ntfs
+volume_id_probe_ocfs1
+volume_id_probe_ocfs2
+volume_id_probe_reiserfs
+volume_id_probe_romfs
+volume_id_probe_sysv
+volume_id_probe_udf
+volume_id_probe_ufs
+volume_id_probe_vxfs
+volume_id_probe_xfs
+volume_id_probe_squashfs
+volume_id_probe_netware
+volume_id_probe_gfs
+volume_id_probe_gfs2
+volume_id_probe_linux_raid
+volume_id_probe_lvm1
+volume_id_probe_lvm2
+volume_id_probe_ddf_raid
+volume_id_probe_intel_software_raid
+volume_id_probe_highpoint_37x_raid
+volume_id_probe_highpoint_45x_raid
+volume_id_probe_lsi_mega_raid
+volume_id_probe_nvidia_raid
+volume_id_probe_promise_fasttrack_raid
+volume_id_probe_silicon_medley_raid
+volume_id_probe_via_raid
+volume_id_probe_adaptec_raid
+volume_id_probe_jmicron_raid
diff --git a/extras/volume_id/lib/libvolume_id.pc.in b/extras/volume_id/lib/libvolume_id.pc.in
new file mode 100644
index 0000000000..5a1e1b77ba
--- /dev/null
+++ b/extras/volume_id/lib/libvolume_id.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@prefix@
+libdir=@prefix@/@libdir_name@
+includedir=@prefix@/include
+
+Name: libvolume_id
+Description: Library for reading metadata, label, uuid from various filesystems
+Version: @VERSION@
+Libs: -L${libdir} -lvolume_id
+Cflags: -I${includedir}
diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c
index 5c4e05d794..60428ab582 100644
--- a/extras/volume_id/vol_id.c
+++ b/extras/volume_id/vol_id.c
@@ -34,7 +34,7 @@
#include <fcntl.h>
#include <sys/ioctl.h>
-#include "../../udev.h"
+#include "../../udev/udev.h"
#include "lib/libvolume_id.h"
#define BLKGETSIZE64 _IOR(0x12,114,size_t)