OSDN Git Service

util-linux: use meson to build
[immortalwrt/immortalwrt.git] / package / utils / util-linux / Makefile
index a93c9f6..706c319 100644 (file)
@@ -25,14 +25,10 @@ PKG_LICENSE_FILES:= COPYING                                 \
                        libuuid/COPYING                         \
                        Documentation/licenses/COPYING.BSD-3
 
-PKG_BUILD_PARALLEL:=1
-
-PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
-DISABLE_NLS:=--disable-nls
-
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/meson.mk
 
 define Package/util-linux/Default
   SECTION:=utils
@@ -552,44 +548,69 @@ define Package/wipefs/description
  libblkid.
 endef
 
-CONFIGURE_ARGS += \
-       --disable-use-tty-group         \
-       --disable-rpath                 \
-       --disable-tls                   \
-       --disable-su                    \
-       --disable-sulogin               \
-       --disable-makeinstall-chown     \
-       --disable-login                 \
-       --disable-nologin               \
-       --disable-lslogins              \
-       --disable-runuser               \
-       --disable-chfn-chsh             \
-       --disable-raw                   \
-       --without-python                \
-       --without-udev                  \
-       --without-readline              \
-       --without-libmagic              \
-       --with-ncursesw
-
-TARGET_CFLAGS += $(FPIC) -std=gnu99
+MESON_ARGS += \
+       -Dsystemd=disabled \
+       -Dtinfo=disabled \
+       -Dcryptsetup=disabled \
+       -Dlibutil=disabled \
+       -Dlibutempter=disabled \
+       -Dlibpcre2-posix=disabled \
+       -Dlibuser=disabled \
+       -Duse-tty-group=false \
+       -Duse-tls=false \
+       -Dbuild-python=disabled \
+       -Dbuild-zramctl=disabled \
+       -Dbuild-fsck=disabled \
+       -Dbuild-wipefs=disabled \
+       -Dbuild-fallocate=disabled \
+       -Dbuild-setpriv=disabled \
+       -Dbuild-hardlink=disabled \
+       -Dbuild-cramfs=disabled \
+       -Dbuild-bfs=disabled \
+       -Dbuild-minix=disabled \
+       -Dbuild-fdformat=disabled \
+       -Dbuild-lslogins=disabled \
+       -Dbuild-wdctl=disabled \
+       -Dbuild-cal=disabled \
+       -Dbuild-switch_root=disabled \
+       -Dbuild-pivot_root=disabled \
+       -Dbuild-lsmem=disabled \
+       -Dbuild-lsirq=disabled \
+       -Dbuild-irqtop=disabled \
+       -Dbuild-chmem=disabled \
+       -Dbuild-ipcrm=disabled \
+       -Dbuild-rfkill=disabled \
+       -Dbuild-tunelp=disabled \
+       -Dbuild-kill=disabled \
+       -Dbuild-last=disabled \
+       -Dbuild-utmpdump=disabled \
+       -Dbuild-line=disabled \
+       -Dbuild-mesg=disabled \
+       -Dbuild-raw=disabled \
+       -Dbuild-vipw=disabled \
+       -Dbuild-newgrp=disabled \
+       -Dbuild-chfn-chsh=disabled \
+       -Dbuild-login=disabled \
+       -Dbuild-nologin=disabled \
+       -Dbuild-sulogin=disabled \
+       -Dbuild-su=disabled \
+       -Dbuild-runuser=disabled \
+       -Dbuild-ul=disabled \
+       -Dbuild-pg=disabled \
+       -Dbuild-write=disabled \
+       -Dbuild-bash-completion=disabled \
+       -Dbuild-pylibmount=disabled \
+       -Dreadline=disabled \
+       -Dmagic=disabled \
+       -Dncursesw=enabled
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/blkid.pc $(1)/usr/lib/pkgconfig
-       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/blkid.pc
-       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/blkid.pc
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fdisk.pc $(1)/usr/lib/pkgconfig
-       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/fdisk.pc
-       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/fdisk.pc
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mount.pc $(1)/usr/lib/pkgconfig
-       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/mount.pc
-       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/mount.pc
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/smartcols.pc $(1)/usr/lib/pkgconfig
-       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/smartcols.pc
-       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/smartcols.pc
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/uuid.pc $(1)/usr/lib/pkgconfig
-       $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/uuid.pc
-       $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/uuid.pc
 
        $(INSTALL_DIR) $(1)/usr/include/blkid
        $(CP) $(PKG_INSTALL_DIR)/usr/include/blkid/blkid.h $(1)/usr/include/blkid
@@ -603,43 +624,37 @@ define Build/InstallDev
        $(CP) $(PKG_INSTALL_DIR)/usr/include/libsmartcols/libsmartcols.h $(1)/usr/include/libsmartcols
 
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib
-
-       $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so
-       $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so
-       $(LN) libmount.so.1 $(1)/usr/lib/libmount.so
-       $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so
-       $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdisk.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmount.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmartcols.so* $(1)/usr/lib
 endef
 
 
 define Package/libfdisk/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdisk.so.* $(1)/usr/lib/
 endef
 
 define Package/libblkid/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
 endef
 
 define Package/libmount/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmount.so.* $(1)/usr/lib/
 endef
 
 define Package/libsmartcols/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmartcols.so.* $(1)/usr/lib/
 endef
 
 define Package/libuuid/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
 endef
 
 define Package/agetty/install