Skip to content

Commit 97555e0

Browse files
committed
Merge PR ceph#59736 into main
* refs/pull/59736/head: deb: Add cephfs.pc to libcephfs-dev rpm: Add cephfs.pc to libcephfs-devel cephfs: Add a pkgconfig file for libcephfs Reviewed-by: Venky Shankar <[email protected]> Reviewed-by: Dan Mick <[email protected]>
2 parents b192a7e + 3069d94 commit 97555e0

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

ceph.spec.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2566,6 +2566,7 @@ fi
25662566
%{_includedir}/cephfs/metrics/Types.h
25672567
%{_libdir}/libcephfs.so
25682568
%{_libdir}/libcephfs_proxy.so
2569+
%{_libdir}/pkgconfig/cephfs.pc
25692570

25702571
%files -n python%{python3_pkgversion}-cephfs
25712572
%{python3_sitearch}/cephfs.cpython*.so

debian/libcephfs-dev.install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ usr/include/cephfs/types.h
44
usr/include/cephfs/metrics/Types.h
55
usr/lib/libcephfs.so
66
usr/lib/libcephfs_proxy.so
7+
usr/lib/pkgconfig/cephfs.pc

src/CMakeLists.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ endif()
1616
set(bindir ${CMAKE_INSTALL_FULL_BINDIR})
1717
set(sbindir ${CMAKE_INSTALL_FULL_SBINDIR})
1818
set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
19+
set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
1920
set(sysconfdir ${CMAKE_INSTALL_FULL_SYSCONFDIR})
2021
set(libexecdir ${CMAKE_INSTALL_FULL_LIBEXECDIR})
2122
set(pkgdatadir ${CMAKE_INSTALL_FULL_DATADIR})
@@ -31,6 +32,12 @@ configure_file(ceph-post-file.in
3132
configure_file(ceph-crash.in
3233
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-crash @ONLY)
3334

35+
if(WITH_LIBCEPHFS)
36+
configure_file(
37+
${CMAKE_SOURCE_DIR}/src/cephfs.pc.in
38+
${CMAKE_BINARY_DIR}/src/cephfs.pc @ONLY)
39+
endif(WITH_LIBCEPHFS)
40+
3441
# the src/.git_version file may be written out by make-dist; otherwise
3542
# we pull the git version from .git
3643
option(ENABLE_GIT_VERSION "build Ceph with git version string" ON)
@@ -832,10 +839,12 @@ if(WITH_LIBCEPHFS)
832839
target_link_libraries(cephfs PRIVATE client ceph-common
833840
${CRYPTO_LIBS} ${EXTRALIBS})
834841
if(ENABLE_SHARED)
842+
set(libcephfs_version 2.0.0)
843+
set(libcephfs_soversion 2)
835844
set_target_properties(cephfs PROPERTIES
836845
OUTPUT_NAME cephfs
837-
VERSION 2.0.0
838-
SOVERSION 2)
846+
VERSION ${libcephfs_version}
847+
SOVERSION ${libcephfs_soversion})
839848
if(NOT APPLE AND NOT
840849
(WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL Clang))
841850
foreach(name ceph-common client osdc)
@@ -848,6 +857,9 @@ if(WITH_LIBCEPHFS)
848857
install(DIRECTORY
849858
"include/cephfs"
850859
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
860+
install(FILES
861+
${CMAKE_BINARY_DIR}/src/cephfs.pc
862+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
851863
set(ceph_syn_srcs
852864
ceph_syn.cc
853865
client/SyntheticClient.cc)

src/cephfs.pc.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
prefix=@prefix@
2+
exec_prefix=${prefix}
3+
libdir=@libdir@
4+
includedir=@includedir@
5+
6+
Name: libcephfs
7+
Description: Ceph distributed file system client library
8+
Version: @libcephfs_version@
9+
Cflags: -I${includedir}/cephfs -D_FILE_OFFSET_BITS=64
10+
Libs: -L${libdir} -lcephfs

0 commit comments

Comments
 (0)