packaging: Add erofs-utils spec file
authorJaehoon Chung <jh80.chung@samsung.com>
Sun, 8 Dec 2024 23:52:22 +0000 (08:52 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Wed, 4 Jun 2025 03:12:40 +0000 (12:12 +0900)
Add erofs-utils spec file to use the utils for Tizen.
This patch is packing only executable files.

Change-Id: I39e7572e849c16bae1f86a79064ee003c842b557
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
packaging/erofs-utils.manifest [new file with mode: 0644]
packaging/erofs-utils.spec [new file with mode: 0644]

diff --git a/packaging/erofs-utils.manifest b/packaging/erofs-utils.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/erofs-utils.spec b/packaging/erofs-utils.spec
new file mode 100644 (file)
index 0000000..d55f877
--- /dev/null
@@ -0,0 +1,52 @@
+Name: erofs-utils
+Version: 1.8.2
+Release: 0
+Summary: Utilities for the Extendable Read-Only Filesystem (EROFS)
+License: GPL-2.0
+Group: System/Kernel
+URL: https://git.kernel.org
+Source0: %{name}-%{version}.tar.gz
+Source1001:     %{name}.manifest
+BuildRequires:  autoconf
+BuildRequires:  automake
+BuildRequires:  lz4-devel
+BuildRequires:  libtool
+BuildRequires:  libuuid-devel
+BuildRequires: libzstd-devel
+BuildRequires:  m4
+BuildRequires:  pkg-config
+BuildRequires:  xz
+BuildRequires:  pkgconfig(liblzma)
+BuildRequires:  pkgconfig(zlib)
+BuildRequires:  pkgconfig(blkid)
+
+%description
+mkfs.erofs is a user-space tool to create erofs filesystem images. It
+can create two main types of erofs images, compressed and
+uncompressed:
+
+* For compressed images, it is able to integrate several compression
+  algorithms, LZ4 is supported according to the current erofs kernel
+  implementation.
+* For uncompressed images, it can decide whether the last page of a
+  file should be inlined or not properly.
+
+%prep
+%autosetup -p1
+cp %{SOURCE1001} .
+
+%build
+export CFLGAS="${CFLAGS} -fPIE"
+export LDFLAGS="${LDFLAGS} -fPIE"
+autoreconf -fiv
+%configure --bindir="%_sbindir" --enable-lzma
+%make_build
+
+%install
+%make_install
+rm -rf %{buildroot}/usr/share/man/man1/*
+
+%files
+%manifest %{name}.manifest
+%license COPYING
+%_sbindir/*erofs