Skip to content

Commit

Permalink
move ddcutil.pc installation to subdirectory data
Browse files Browse the repository at this point in the history
for some undetermined reason, it was not longer being installed by
top level Makefile
  • Loading branch information
rockowitz committed Sep 27, 2023
1 parent 8b9c901 commit 1b1456a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 32 deletions.
32 changes: 3 additions & 29 deletions Makefile.am
Expand Up @@ -30,37 +30,11 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
# endif
EXTRA_DIST += m4/introspection.m4

# install-data-local:
# @echo "(Makefile) install-data-local):"
# @echo " docdir = $(docdir)"

# The proper location for pkgconfig files is ambiguous, and the
# subject of much discussion. .
# However, it appears that:
# - /usr/lib64/pkgconfig should hold x64 specific pkgconfig files
# - /usr/lib/pkgconfig should hold i386 specific pkgconfig files
# - /usr/share/pkgconfig should hold architecture agnostic pkgconfig files
#
# The tail wags the dog. libddcutil-dev can contain
# usr/*/pkgconfig
# or
# usr/lib/x86_64-linux-gnu/pkgconfig
# but there's no way to "or" these two statements.
#
# When building on OBS, the same libddcutil-dev.install is used for all (Debian based) builds,
# and if using $(libdir) the location of ddcutil.pc will depend on platform, e.g.
# some times it will be /usr/lib/x86_64-linux-gnu/pkgconfig, sometimes something else.
#
# Note the the entry for ddcutil.pc in the Debian .install file needs
# to be kept in sync with where autotools puts the files.

install-data-local:
@echo "(Makefile) install-data-local):"
@echo " docdir = $(docdir)"

pkgconfigdir=${libdir}/pkgconfig
if ENABLE_SHARED_LIB_COND
if !INSTALL_LIB_ONLY_COND
pkgconfig_DATA=ddcutil.pc
endif

libddcdocdir = $(datarootdir)/doc/libddcutil
# libddcdoc_DATA = AUTHORS
endif
Expand Down
3 changes: 2 additions & 1 deletion configure.ac
Expand Up @@ -87,7 +87,8 @@ AC_CONFIG_FILES([
docs/Makefile
docs/doxygen/Makefile
src/public/ddcutil_macros.h
ddcutil.pc
ddcutil.pc
data/ddcutil.pc
],
)
dnl AC_CONFIG_FILES(package/upload_obsrpm, [chmod +x package/upload_obsrpm] )
Expand Down
32 changes: 30 additions & 2 deletions data/Makefile.am
Expand Up @@ -3,6 +3,28 @@
# Copyright (C) 2016-2023 Sanford Rockowitz <rockowitz@minsoft.com>
# SPDX-License-Identifier: GPL-2.0-or-later

# The proper location for pkgconfig files is ambiguous, and the
# subject of much discussion. .
# However, it appears that:
# - /usr/lib64/pkgconfig should hold x64 specific pkgconfig files
# - /usr/lib/pkgconfig should hold i386 specific pkgconfig files
# - /usr/share/pkgconfig should hold architecture agnostic pkgconfig files
#
# The tail wags the dog. libddcutil-dev can contain
# usr/*/pkgconfig
# or
# usr/lib/x86_64-linux-gnu/pkgconfig
# but there's no way to "or" these two statements.
#
# When building on OBS, the same libddcutil-dev.install is used for all (Debian based) builds,
# and if using $(libdir) the location of ddcutil.pc will depend on platform, e.g.
# some times it will be /usr/lib/x86_64-linux-gnu/pkgconfig, sometimes something else.
#
# Note the the entry for ddcutil.pc in the Debian .install file needs
# to be kept in sync with where autotools puts the files.



resfiles = \
etc/modprobe.d/nvidia-i2c.conf \
etc/udev/rules.d/60-ddcutil-i2c.rules \
Expand All @@ -21,16 +43,22 @@ installed_modulesfiles = \
usr/lib/modules-load.d/ddcutil.conf
endif

# Causes files (with directory structure) to be included in tarball:
EXTRA_DIST = $(resfiles) $(rulesfiles) $(distributed_modulesfiles)
pkgconfigfiles = \
ddcutil.pc

# Causes files (with directory structure) to be included in tarball:
EXTRA_DIST = $(resfiles) $(rulesfiles) $(distributed_modulesfiles) ddcutil.pc.in

# Target directory
pkgconfigdir = ${libdir}/pkgconfig

# Target directory (/usr/local/share/ddcutil/data or /usr/share/ddcutil/data):
ddcutildir = $(datadir)/ddcutil/data
# Causes files (w/o directory structure) to be installed in target directory:

if !INSTALL_LIB_ONLY_COND
ddcutil_DATA = $(resfiles)
pkgconfig_DATA = ddcutil.pc
endif

# Use prefix instead of libdir here because it appears that
Expand Down
File renamed without changes.

0 comments on commit 1b1456a

Please sign in to comment.