Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions debian/rofd-ffi.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${prefix}/lib/@MULTIARCH@

Name: rofd-ffi
Description: Stable C ABI for the rofd OFD reader and renderer
URL: https://github.com/linuxdeepin/rofd
Version: @VERSION@
# rofd.h includes <cairo.h>, so consumers need cairo's headers and library
Requires: cairo
Cflags: -I${includedir}
Libs: -L${libdir} -lrofd_ffi
10 changes: 10 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export DH_VERBOSE = 1
export CARGO_HOME = $(CURDIR)/debian/.cargo-home
export CARGO_NET_OFFLINE = true

# pkg-config metadata reports the Debian version (the release identifier), not
# the Cargo crate version: the crate version lags the release train, and
# consumers compare against it (e.g. dependency('rofd-ffi', version: '>= 0.4.2')).
ROFD_FFI_VERSION = $(shell dpkg-parsechangelog -SVersion)

%:
dh $@

Expand All @@ -28,6 +33,11 @@ override_dh_auto_install:
debian/librofd-ffi0/usr/lib/$(DEB_HOST_MULTIARCH)/librofd_ffi.so.0.4.0
install -D -m0644 crates/rofd-ffi/include/rofd.h \
debian/librofd-ffi-dev/usr/include/rofd.h
install -d debian/librofd-ffi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
sed -e 's/@VERSION@/$(ROFD_FFI_VERSION)/' \
-e 's/@MULTIARCH@/$(DEB_HOST_MULTIARCH)/' \
debian/rofd-ffi.pc.in \
> debian/librofd-ffi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/rofd-ffi.pc
dh_link -plibrofd-ffi0 \
usr/lib/$(DEB_HOST_MULTIARCH)/librofd_ffi.so.0.4.0 \
usr/lib/$(DEB_HOST_MULTIARCH)/librofd_ffi.so.0
Expand Down
Loading