Skip to content

Commit

Permalink
build-sys: add fdisk.pc
Browse files Browse the repository at this point in the history
Signed-off-by: Karel Zak <kzak@redhat.com>
  • Loading branch information
karelzak committed Nov 26, 2014
1 parent c820e3f commit ed79557
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile.am
Expand Up @@ -125,6 +125,8 @@ edit_cmd = sed \
-e 's|@LIBMOUNT_MINOR_VERSION[@]|$(LIBMOUNT_MINOR_VERSION)|g' \
-e 's|@LIBMOUNT_PATCH_VERSION[@]|$(LIBMOUNT_PATCH_VERSION)|g' \
-e 's|@LIBSMARTCOLS_VERSION[@]|$(LIBSMARTCOLS_VERSION)|g' \
-e 's|@LIBFDISK_PC_REQUIRES[@]|$(LIBFDISK_PC_REQUIRES)|g' \
-e 's|@LIBFDISK_VERSION[@]|$(LIBFDISK_VERSION)|g' \
-e 's|@LIBBLKID_VERSION[@]|$(LIBBLKID_VERSION)|g'

CLEANFILES += $(PATHFILES)
Expand Down
4 changes: 4 additions & 0 deletions configure.ac
Expand Up @@ -861,6 +861,10 @@ UL_REQUIRES_BUILD([libfdisk], [libuuid])
AM_CONDITIONAL([BUILD_LIBFDISK], [test "x$build_libfdisk" = xyes])
AM_CONDITIONAL([BUILD_LIBFDISK_TESTS], [test "x$build_libfdisk" = xyes -a "x$enable_static" = xyes])

AS_IF([test "x$build_libblkid" = xyes],
[LIBFDISK_PC_REQUIRES="uuid blkid"],[LIBFDISK_PC_REQUIRES="uuid"])
AC_SUBST([LIBFDISK_PC_REQUIRES])

AC_SUBST([LIBFDISK_VERSION])
AC_SUBST([LIBFDISK_VERSION_INFO])
AC_DEFINE_UNQUOTED([LIBFDISK_VERSION], ["$LIBFDISK_VERSION"], [libfdisk version string])
Expand Down
2 changes: 2 additions & 0 deletions libfdisk/Makemodule.am
Expand Up @@ -2,6 +2,8 @@ if BUILD_LIBFDISK

include libfdisk/src/Makemodule.am

pkgconfig_DATA += libfdisk/fdisk.pc
PATHFILES += libfdisk/fdisk.pc
EXTRA_DIST += libfdisk/COPYING

endif # BUILD_LIBFDISK
11 changes: 11 additions & 0 deletions libfdisk/fdisk.pc.in
@@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@usrlib_execdir@
includedir=@includedir@

Name: fdisk
Description: fdisk library
Version: @LIBFDISK_VERSION@
Requires.private: @LIBFDISK_PC_REQUIRES@
Cflags: -I${includedir}/libfdisk
Libs: -L${libdir} -lfdisk

0 comments on commit ed79557

Please sign in to comment.