File tree Expand file tree Collapse file tree 6 files changed +47
-8
lines changed Expand file tree Collapse file tree 6 files changed +47
-8
lines changed Original file line number Diff line number Diff line change 55/libs /libtcb.so
66/libs /libtcb.so.0
77/libs /libtcb.so.0. *
8+ /misc /tcb.pc
89/misc /tcb.sysusers
910/pam_tcb /pam_tcb.so *
1011/progs /tcb_chkpwd
Original file line number Diff line number Diff line change 2929 * misc/tcb-auth.sysusers: New file.
3030 * .gitignore: Add build output from "misc" directory.
3131
32+ misc: Add pkgconfig file.
33+ pkgconfig files provide a useful mechanism for storing various
34+ information about libraries and packages on a given system.
35+ Information stored by .pc files include compiler and linker flags
36+ necessary to use a given library, as well as any other relevant
37+ metadata.
38+ * Make.defs: Add new presets for PREFIX, INCLUDEDIR, and
39+ PKGCONFIGDIR. Also adapt the existing presets slightly.
40+ * misc/Makefile: Build and install the pkgconfig file.
41+ Also use INCLUDEDIR instead of hardcoding its path, and
42+ adapt the clean target.
43+ * misc/tcb.pc.in: New file.
44+ * tcb.spec: Add pkgconfig file.
45+ * .gitignore: Add ignore rule for tcb.pc.
46+
32472021-09-25 Björn Esser <besser82 at fedoraproject.org>
3348
3449 * pam_tcb/support.c (_set_ctrl): Request automatic prefix only if
Original file line number Diff line number Diff line change @@ -17,11 +17,14 @@ endif
1717#CFLAGS += -DFAIL_RECORD
1818LDFLAGS += $(DBGFLAG) -L../libs
1919
20+ PREFIX = /usr
2021SBINDIR = /sbin
2122SLIBDIR = /lib
22- LIBDIR = /usr/lib
23- LIBEXECDIR = /usr/libexec
24- MANDIR = /usr/man
25- SYSUSERSDIR = /usr/lib/sysusers.d
23+ INCLUDEDIR = $(PREFIX)/include
24+ LIBDIR = $(PREFIX)/lib
25+ LIBEXECDIR = $(PREFIX)/libexec
26+ MANDIR = $(PREFIX)/man
27+ PKGCONFIGDIR = $(LIBDIR)/pkgconfig
28+ SYSUSERSDIR = $(PREFIX)/lib/sysusers.d
2629
2730SHLIBMODE = 755
Original file line number Diff line number Diff line change 11include ../Make.defs
22
3- all : tcb.sysusers
3+ VERSION != sed -e "/^Version : * /!d;s///;q" < ../tcb.spec
4+
5+ all : tcb.pc tcb.sysusers
6+
7+ tcb.pc : tcb.pc.in
8+ sed -e " s!@PREFIX@!$( PREFIX) !g" -e " s!@SLIBDIR@!$( SLIBDIR) !g" \
9+ -e " s!@INCLUDEDIR@!$( INCLUDEDIR) !g" -e " s!@VERSION@!$( VERSION) !g" \
10+ < $< > $@
411
512tcb.sysusers : tcb.sysusers.in
613 sed -e " s!@LIBEXECDIR@!$( LIBEXECDIR) !g" < $< > $@
@@ -9,10 +16,12 @@ install-non-root: install
916
1017install :
1118 $(MKDIR ) -p -m 755 $(DESTDIR )$(MANDIR ) /man5
12- $(MKDIR ) -p -m 755 $(DESTDIR ) /usr/include
19+ $(MKDIR ) -p -m 755 $(DESTDIR )$(INCLUDEDIR )
20+ $(MKDIR ) -p -m 755 $(DESTDIR )$(PKGCONFIGDIR )
1321
1422 $(INSTALL) -m 644 tcb.5 $(DESTDIR)$(MANDIR)/man5/
15- $(INSTALL) -m 644 ../include/tcb.h $(DESTDIR)/usr/include/
23+ $(INSTALL) -m 644 ../include/tcb.h $(DESTDIR)$(INCLUDEDIR)
24+ $(INSTALL) -m 644 tcb.pc $(DESTDIR)$(PKGCONFIGDIR)
1625
1726install-sysusers :
1827 $(MKDIR ) -p -m 755 $(DESTDIR )$(SYSUSERSDIR )
@@ -22,4 +31,4 @@ install-sysusers-auth: install-sysusers
2231 $(INSTALL ) -m 644 tcb-auth.sysusers $(DESTDIR )$(SYSUSERSDIR ) /tcb-auth.conf
2332
2433clean :
25- rm -f tcb.sysusers
34+ rm -f tcb.pc tcb. sysusers
Original file line number Diff line number Diff line change 1+ prefix=@PREFIX@
2+ exec_prefix=${prefix}
3+ libdir=@SLIBDIR@
4+ includedir=@INCLUDEDIR@
5+
6+ Name: tcb
7+ Description: Library implementing the tcb password shadowing scheme
8+ Version: @VERSION@
9+ Libs: -L${libdir} -ltcb
10+ Cflags: -I${includedir}
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ rmdir /sbin/chkpwd.d
8787%_includedir /tcb.h
8888%_libdir /libtcb.a
8989%_libdir /libtcb.so
90+ %_libdir /pkgconfig/tcb.pc
9091
9192%changelog
9293* Mon Jan 11 2021 Solar Designer <solar-at-owl.openwall.com> 1.2-owl1
You can’t perform that action at this time.
0 commit comments