File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,24 @@ BIN_PATH ?=$(PREFIX)/usr# /bin is appended later
117117BIN_AFTER_INST_PATH ?=$(BIN_PATH ) # needed for debian package and desktop file exec
118118PROMPT_BIN_PATH ?=$(PREFIX ) /usr# /bin is appended later
119119LIB_PATH ?=$(PREFIX ) /usr/lib/x86_64-linux-gnu
120- LIBDEV_PATH ?=$(PREFIX ) /usr/lib/x86_64-linux-gnu
120+ ifeq ($(origin LIB_PATH ) , default)
121+ # Debian/Ubuntu
122+ DEB_MULTIARCH := $(shell command -v dpkg-architecture >/dev/null 2>&1 && dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)
123+ ifneq ($(DEB_MULTIARCH),)
124+ LIB_PATH := $(prefix ) /lib/$(DEB_MULTIARCH )
125+ else
126+ # RPM-based
127+ HAVE_RPM := $(shell command -v rpm >/dev/null 2>&1 && echo yes)
128+ ifeq ($(HAVE_RPM),yes)
129+ RPM_LIBDIR := $(shell rpm --eval % _libdir)
130+ ifeq ($(prefix),/usr)
131+ LIB_PATH := $(RPM_LIBDIR )
132+ else
133+ LIB_PATH := $(prefix ) /$(shell echo $(RPM_LIBDIR ) | sed 's|^/usr/||')
134+ endif
135+ endif
136+ endif
137+ LIBDEV_PATH ?=$(LIB_PATH )
121138INCLUDE_PATH ?=$(PREFIX ) /usr/include/x86_64-linux-gnu
122139MAN_PATH ?=$(PREFIX ) /usr/share/man
123140PROMPT_MAN_PATH ?=$(PREFIX ) /usr/share/man
You can’t perform that action at this time.
0 commit comments