Hi, During the work on Android SDK I corrected some compiler flags for libf2fs_format.so, please consider this improved patch. You can also view the patch at <https://github.com/seamlik/debianpkg-f2fs-tools/compare/master...modify-autotools>. Thank you.
Regards, Kai-Chung Yan
diff --git a/debian/changelog b/debian/changelog index 8fb9492..2305a2a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +f2fs-tools (1.4.1-2) UNRELEASED; urgency=low + + * New packages: + - libf2fs-dev + - libf2fs-format-dev + - libf2fs-format1 + - libf2fs1 + * New libtool_versioning.diff: soname will include major version + * New libf2fs_format.diff: Produce libf2fs_format.so + + -- Kai-Chung Yan <seamli...@gmail.com> Thu, 30 Jul 2015 20:16:10 +0800 + f2fs-tools (1.4.1-1) unstable; urgency=medium * New upstream release. diff --git a/debian/control b/debian/control index d068f6d..92046eb 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: optional Maintainer: Filesystems Group <filesystems-de...@lists.alioth.debian.org> Uploaders: Vincent Cheng <vch...@debian.org> -Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config, uuid-dev +Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config, uuid-dev, dh-exec Standards-Version: 3.9.6 Homepage: http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git Vcs-Svn: svn://anonscm.debian.org/collab-maint/deb-maint/f2fs-tools/trunk @@ -28,3 +28,46 @@ Description: Tools for Flash-Friendly File System (debug) System (LFS). . This package contains the debugging symbols. + +Package: libf2fs1 +Section: libs +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Core library for Flash-Friendly File System + F2FS is a new filesystem for Linux aimed at NAND flash memory-based storage + devices, such as SSD, eMMC, and SD cards. It is based on Log-structured File + System (LFS). + +Package: libf2fs-dev +Section: libdevel +Architecture: linux-any +Depends: libf2fs1 (= ${binary:Version}), ${misc:Depends} +Description: Core library for Flash-Friendly File System - Development files + F2FS is a new filesystem for Linux aimed at NAND flash memory-based storage + devices, such as SSD, eMMC, and SD cards. It is based on Log-structured File + System (LFS). + . + This package contains the development files. + +Package: libf2fs-format1 +Section: libs +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Library for F2FS formating + F2FS is a new filesystem for Linux aimed at NAND flash memory-based storage + devices, such as SSD, eMMC, and SD cards. It is based on Log-structured File + System (LFS). + +Package: libf2fs-format-dev +Section: libdevel +Architecture: linux-any +Depends: libf2fs-dev, + libf2fs-format1 (= ${binary:Version}), + uuid-dev, + ${misc:Depends} +Description: Library for F2FS formating - Development files + F2FS is a new filesystem for Linux aimed at NAND flash memory-based storage + devices, such as SSD, eMMC, and SD cards. It is based on Log-structured File + System (LFS). + . + This package contains the development files. \ No newline at end of file diff --git a/debian/f2fs-tools.install b/debian/f2fs-tools.install new file mode 100644 index 0000000..0a31ff2 --- /dev/null +++ b/debian/f2fs-tools.install @@ -0,0 +1 @@ +debian/tmp/sbin/* usr/sbin \ No newline at end of file diff --git a/debian/libf2fs-dev.install b/debian/libf2fs-dev.install new file mode 100755 index 0000000..48963e7 --- /dev/null +++ b/debian/libf2fs-dev.install @@ -0,0 +1,4 @@ +#!/usr/bin/dh-exec + +debian/tmp/lib/libf2fs.a usr/lib/${DEB_HOST_MULTIARCH} +include/* usr/include/f2fs-tools \ No newline at end of file diff --git a/debian/libf2fs-dev.links b/debian/libf2fs-dev.links new file mode 100755 index 0000000..41d5535 --- /dev/null +++ b/debian/libf2fs-dev.links @@ -0,0 +1,3 @@ +#!/usr/bin/dh-exec + +usr/lib/${DEB_HOST_MULTIARCH}/libf2fs.so.${DEB_UPSTREAM_VERSION} usr/lib/${DEB_HOST_MULTIARCH}/libf2fs.so \ No newline at end of file diff --git a/debian/libf2fs-format-dev.install b/debian/libf2fs-format-dev.install new file mode 100755 index 0000000..1427e3e --- /dev/null +++ b/debian/libf2fs-format-dev.install @@ -0,0 +1,4 @@ +#!/usr/bin/dh-exec + +debian/tmp/lib/libf2fs_format.a usr/lib/${DEB_HOST_MULTIARCH} +mkfs/*.h usr/include/f2fs-tools \ No newline at end of file diff --git a/debian/libf2fs-format-dev.links b/debian/libf2fs-format-dev.links new file mode 100755 index 0000000..53c4191 --- /dev/null +++ b/debian/libf2fs-format-dev.links @@ -0,0 +1,3 @@ +#!/usr/bin/dh-exec + +usr/lib/${DEB_HOST_MULTIARCH}/libf2fs_format.so.${DEB_UPSTREAM_VERSION} usr/lib/${DEB_HOST_MULTIARCH}/libf2fs_format.so \ No newline at end of file diff --git a/debian/libf2fs-format1.install b/debian/libf2fs-format1.install new file mode 100755 index 0000000..8a80315 --- /dev/null +++ b/debian/libf2fs-format1.install @@ -0,0 +1,3 @@ +#!/usr/bin/dh-exec + +debian/tmp/lib/libf2fs_format.so.1.0.0 => usr/lib/${DEB_HOST_MULTIARCH}/libf2fs_format.so.${DEB_UPSTREAM_VERSION} \ No newline at end of file diff --git a/debian/libf2fs-format1.links b/debian/libf2fs-format1.links new file mode 100755 index 0000000..e4ae3dc --- /dev/null +++ b/debian/libf2fs-format1.links @@ -0,0 +1,3 @@ +#!/usr/bin/dh-exec + +usr/lib/${DEB_HOST_MULTIARCH}/libf2fs_format.so.${DEB_UPSTREAM_VERSION} usr/lib/${DEB_HOST_MULTIARCH}/libf2fs_format.so.1 \ No newline at end of file diff --git a/debian/libf2fs1.install b/debian/libf2fs1.install new file mode 100755 index 0000000..cd23d44 --- /dev/null +++ b/debian/libf2fs1.install @@ -0,0 +1,3 @@ +#!/usr/bin/dh-exec + +debian/tmp/lib/libf2fs.so.1.0.0 => usr/lib/${DEB_HOST_MULTIARCH}/libf2fs.so.${DEB_UPSTREAM_VERSION} \ No newline at end of file diff --git a/debian/libf2fs1.links b/debian/libf2fs1.links new file mode 100755 index 0000000..59eb335 --- /dev/null +++ b/debian/libf2fs1.links @@ -0,0 +1,3 @@ +#!/usr/bin/dh-exec + +usr/lib/${DEB_HOST_MULTIARCH}/libf2fs.so.${DEB_UPSTREAM_VERSION} usr/lib/${DEB_HOST_MULTIARCH}/libf2fs.so.1 \ No newline at end of file diff --git a/debian/patches/libf2fs_format.diff b/debian/patches/libf2fs_format.diff new file mode 100644 index 0000000..ca2a550 --- /dev/null +++ b/debian/patches/libf2fs_format.diff @@ -0,0 +1,16 @@ +Description: Upstream does not produce libf2fs_format.so +Author: Kai-Chung Yan <seamli...@gmail.com> +Last-Update: 2015-07-30 +--- a/mkfs/Makefile.am ++++ b/mkfs/Makefile.am +@@ -5,3 +5,9 @@ + sbin_PROGRAMS = mkfs.f2fs + mkfs_f2fs_SOURCES = f2fs_format_main.c f2fs_format.c f2fs_format_utils.c + mkfs_f2fs_LDADD = ${libuuid_LIBS} $(top_builddir)/lib/libf2fs.la ++ ++lib_LTLIBRARIES = libf2fs_format.la ++libf2fs_format_la_SOURCES = f2fs_format_main.c f2fs_format.c f2fs_format_utils.c ++libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD ++libf2fs_format_la_CPPFLAGS = -I$(top_srcdir)/include ++libf2fs_format_la_LDFLAGS = -version-info 1 -luuid -L$(top_srcdir)/lib -lf2fs +\ No newline at end of file diff --git a/debian/patches/libtool_versioning.diff b/debian/patches/libtool_versioning.diff new file mode 100644 index 0000000..dd8f48a --- /dev/null +++ b/debian/patches/libtool_versioning.diff @@ -0,0 +1,13 @@ +Description: + Upstream did not configure Libtool for versioning the libraries. With this + patch the field "soname" will include the major version. +Author: Kai-Chung Yan <seamli...@gmail.com> +Last-Update: 2015-07-30 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -5,3 +5,4 @@ + libf2fs_la_SOURCES = libf2fs.c libf2fs_io.c + libf2fs_la_CFLAGS = -Wall + libf2fs_la_CPPFLAGS = -I$(top_srcdir)/include ++libf2fs_la_LDFLAGS = -version-info 1 +\ No newline at end of file diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..c6db65a --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +libtool_versioning.diff +libf2fs_format.diff diff --git a/debian/rules b/debian/rules index 06ec920..9b31125 100755 --- a/debian/rules +++ b/debian/rules @@ -1,21 +1,13 @@ #!/usr/bin/make -f DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -DEB_UPSTREAM_VERSION ?= $(shell dpkg-parsechangelog | \ - sed -rne 's,^Version: ([^-]+).*,\1,p') +export DEB_UPSTREAM_VERSION ?= $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p') %: dh $@ --with autoreconf override_dh_auto_configure: - dh_auto_configure -- --bindir=/sbin --libdir=/lib/$(DEB_HOST_MULTIARCH) - -override_dh_auto_install: - dh_auto_install -- DESTDIR="$(CURDIR)/debian/f2fs-tools" - -override_dh_install: - find $(CURDIR) -name "*.la" -delete - dh_install + dh_auto_configure -- --bindir=/sbin --libdir=/lib override_dh_strip: dh_strip --dbg-package=f2fs-tools-dbg