e2fsprogs: add libe2p and development headers
authorOskari Rauta <oskari.rauta@gmail.com>
Wed, 14 Feb 2024 04:38:49 +0000 (06:38 +0200)
committerRobert Marko <robimarko@gmail.com>
Mon, 26 Feb 2024 20:19:10 +0000 (21:19 +0100)
this patch separates libe2p from e2fsprogs package, like all other
provided libraries are their own packages. Also some development headers
were missing so I added those along with pkg-config files.

Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
package/utils/e2fsprogs/Makefile

index 2657077a16be29958cbc632564f6d97a9b9b5a26..9e2f2fafe55345a1b99086d4f85d359bc81121a9 100644 (file)
@@ -34,7 +34,7 @@ define Package/e2fsprogs
   SUBMENU:=Filesystem
   TITLE:=Ext2/3/4 filesystem utilities
   URL:=http://e2fsprogs.sourceforge.net/
-  DEPENDS:=+libuuid +libext2fs
+  DEPENDS:=+libuuid +libext2fs +libe2p
 endef
 
 define Package/e2fsprogs/description
@@ -55,6 +55,20 @@ define Package/libext2fs/description
  libext2fs is a library which can access ext2, ext3 and ext4 filesystems.
 endef
 
+define Package/libe2p
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=ext2fs userspace programs utility library
+  URL:=http://e2fsprogs.sourceforge.net/
+  DEPENDS:=+libuuid
+  ABI_VERSION:=2
+endef
+
+define Package/libe2p/description
+ This package contains libe2p, ext2fs userspace programs utility library
+ bundled with e2fsprogs.
+endef
+
 define Package/libss
   SECTION:=libs
   CATEGORY:=Libraries
@@ -184,13 +198,17 @@ endef
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+
        $(CP) $(PKG_BUILD_DIR)/lib/ext2fs/ext2fs.pc $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_BUILD_DIR)/lib/et/com_err.pc $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_BUILD_DIR)/lib/e2p/e2p.pc $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_BUILD_DIR)/lib/ss/ss.pc $(1)/usr/lib/pkgconfig
 
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_BUILD_DIR)/lib/libext2fs.{so,a}* $(1)/usr/lib
        $(CP) $(PKG_BUILD_DIR)/lib/libcom_err.{so,a}* $(1)/usr/lib
        $(CP) $(PKG_BUILD_DIR)/lib/libss.{so,a}* $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/lib/libe2p.{so,a}* $(1)/usr/lib
 
        $(INSTALL_DIR) $(1)/usr/include/ext2fs
        $(CP) $(PKG_BUILD_DIR)/lib/ext2fs/*.h $(1)/usr/include/ext2fs
@@ -203,6 +221,8 @@ define Build/InstallDev
                $(PKG_BUILD_DIR)/lib/ss/ss.h \
                $(PKG_BUILD_DIR)/lib/ss/ss_err.h \
                $(1)/usr/include/ss/
+       $(INSTALL_DIR) $(1)/usr/include/e2p
+       $(CP) $(PKG_BUILD_DIR)/lib/e2p/e2p.h $(1)/usr/include/e2p
 endef
 
 define Host/Compile
@@ -237,13 +257,17 @@ define Package/e2fsprogs/install
        $(LN) e2fsck $(1)/usr/sbin/fsck.ext3
        $(LN) e2fsck $(1)/usr/sbin/fsck.ext4
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_DIR) $(1)/lib/functions/fsck
        $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
        $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
 endef
 
+define Package/libe2p/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
+endef
+
 define Package/libcomerr/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* $(1)/usr/lib/
@@ -318,6 +342,7 @@ endef
 $(eval $(call BuildPackage,libcomerr))
 $(eval $(call BuildPackage,libss))
 $(eval $(call BuildPackage,libext2fs))
+$(eval $(call BuildPackage,libe2p))
 $(eval $(call BuildPackage,e2fsprogs))
 $(eval $(call BuildPackage,tune2fs))
 $(eval $(call BuildPackage,resize2fs))