Skip to content

Commit a866d8c

Browse files
Blarsesolardiz
authored andcommitted
Add pkg-config file
1 parent 4542bee commit a866d8c

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.o
22
*.so
33
*.so.*
4+
/passwdqc.pc
45
/pwqcheck
56
/pwqfilter
67
/pwqgen

CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Significant changes since 2.0.2.
2+
3+
Added pkg-config file.
4+
5+
16
Significant changes between 2.0.1 and 2.0.2.
27

38
Improved pam_passwdqc's auto-generated policy descriptions further, so

Makefile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#
77

88
PACKAGE = passwdqc
9+
VERSION = 2.0.2
910
TITLE = pam_passwdqc
1011
SHARED_LIB = libpasswdqc.so.1
1112
DEVEL_LIB = libpasswdqc.so
@@ -18,6 +19,8 @@ MAP_PAM = pam_passwdqc.map
1819
SHLIBMODE = 755
1920
HEADER = passwdqc.h
2021
INCMODE = 644
22+
PKGCONFIG = passwdqc.pc
23+
PKGCONFMODE = 644
2124
MAN1 = pwqgen.1 pwqcheck.1 pwqfilter.1
2225
MAN3 = libpasswdqc.3 \
2326
passwdqc_params_reset.3 \
@@ -41,6 +44,7 @@ SECUREDIR = /lib/security
4144
SECUREDIR_SUN = /usr/lib/security
4245
SECUREDIR_DARWIN = /usr/lib/pam
4346
INCLUDEDIR = /usr/include
47+
PKGCONFIGDIR = $(DEVEL_LIBDIR)/pkgconfig
4448
MANDIR = /usr/share/man
4549
DESTDIR =
4650
LOCALEDIR = /usr/share/locale
@@ -104,7 +108,7 @@ LDLIBS_pam_DARWIN = -lpam -lSystem
104108

105109
CONFIGS = passwdqc.conf
106110
BINS = pwqgen pwqcheck pwqfilter
107-
PROJ = $(SHARED_LIB) $(DEVEL_LIB) $(SHARED_PAM) $(BINS)
111+
PROJ = $(SHARED_LIB) $(DEVEL_LIB) $(SHARED_PAM) $(BINS) $(PKGCONFIG)
108112
OBJS_LIB = concat.o md4.o passwdqc_check.o passwdqc_filter.o passwdqc_load.o passwdqc_memzero.o passwdqc_parse.o passwdqc_random.o wordset_4k.o
109113
OBJS_PAM = pam_passwdqc.o passwdqc_memzero.o
110114
OBJS_GEN = pwqgen.o passwdqc_memzero.o
@@ -144,7 +148,7 @@ all locales pam utils install install_lib install_locales install_pam install_ut
144148
*) $(MAKE) $@_wrapped;; \
145149
esac
146150

147-
all_wrapped: pam_wrapped utils_wrapped
151+
all_wrapped: pam_wrapped utils_wrapped $(PKGCONFIG)
148152

149153
pam_wrapped: $(SHARED_PAM)
150154

@@ -180,6 +184,9 @@ pwqfilter.o: pwqfilter.c passwdqc_filter.h passwdqc.h
180184
.c.o:
181185
$(CC) $(CPPFLAGS_lib) $(CFLAGS_lib) -c $*.c
182186

187+
$(PKGCONFIG): $(PKGCONFIG).in
188+
sed -e "s|@VERSION@|$(VERSION)|g" $< > $@
189+
183190
concat.o: concat.h
184191
pam_passwdqc.o: passwdqc.h pam_macros.h
185192
passwdqc_check.o: passwdqc.h passwdqc_filter.h wordset_4k.h
@@ -206,6 +213,9 @@ install_lib_wrapped:
206213
$(MKDIR) $(DESTDIR)$(INCLUDEDIR)
207214
$(INSTALL) -m $(INCMODE) $(HEADER) $(DESTDIR)$(INCLUDEDIR)/
208215

216+
$(MKDIR) $(DESTDIR)$(PKGCONFIGDIR)
217+
$(INSTALL) -m $(PKGCONFMODE) $(PKGCONFIG) $(DESTDIR)$(PKGCONFIGDIR)/
218+
209219
$(MKDIR) $(DESTDIR)$(MANDIR)/man3
210220
$(INSTALL) -m $(MANMODE) $(MAN3) $(DESTDIR)$(MANDIR)/man3/
211221

@@ -267,6 +277,7 @@ remove_lib_wrapped:
267277
for f in $(MAN5); do $(RM) $(DESTDIR)$(MANDIR)/man5/$$f; done
268278
for f in $(MAN3); do $(RM) $(DESTDIR)$(MANDIR)/man3/$$f; done
269279
for f in $(HEADER); do $(RM) $(DESTDIR)$(INCLUDEDIR)/$$f; done
280+
for f in $(PKGCONFIG); do $(RM) $(DESTDIR)$(PKGCONFIGDIR)/$$f; done
270281
for f in $(DEVEL_LIB); do $(RM) $(DESTDIR)$(DEVEL_LIBDIR)/$$f; done
271282
for f in $(SHARED_LIB); do $(RM) $(DESTDIR)$(SHARED_LIBDIR)/$$f; done
272283
for f in $(CONFIGS); do $(RM) $(DESTDIR)$(CONFDIR)/$$f; done

passwdqc.pc.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Name: passwdqc
2+
Description: Password/passphrase strength checking and policy enforcement
3+
Version: @VERSION@
4+
Libs: -lpasswdqc
5+
Cflags:

0 commit comments

Comments
 (0)