mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 18:46:00 +01:00
provide pkg-config file to build plugins
This commit is contained in:
parent
376390a65c
commit
87cff5ac75
2 changed files with 24 additions and 3 deletions
18
Makefile
18
Makefile
|
@ -35,7 +35,7 @@ ${PROJECT}: ${OBJECTS}
|
|||
|
||||
clean:
|
||||
@rm -rf ${PROJECT} ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \
|
||||
${DOBJECTS} ${PROJECT}-debug .depend
|
||||
${DOBJECTS} ${PROJECT}-debug .depend ${PROJECT}.pc
|
||||
|
||||
${PROJECT}-debug: ${DOBJECTS}
|
||||
@echo CC -o ${PROJECT}-debug
|
||||
|
@ -43,6 +43,12 @@ ${PROJECT}-debug: ${DOBJECTS}
|
|||
|
||||
debug: ${PROJECT}-debug
|
||||
|
||||
${PROJECT}.pc: ${PROJECT}.pc.in config.mk
|
||||
@echo project=${PROJECT} > ${PROJECT}.pc
|
||||
@echo version=${VERSION} >> ${PROJECT}.pc
|
||||
@echo includedir=${PREFIX}/include/${PROJECT} >> ${PROJECT}.pc
|
||||
@cat ${PROJECTNV}.pc.in >> ${PROJECT}.pc
|
||||
|
||||
valgrind: debug
|
||||
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes \
|
||||
./${PROJECT}-debug
|
||||
|
@ -53,12 +59,13 @@ gdb: debug
|
|||
dist: clean
|
||||
@${MAKE} -p ${PROJECT}-${VERSION}
|
||||
@cp -R LICENSE Makefile config.mk README \
|
||||
${PROJECT}.1 ${SOURCE} ${PROJECT}-${VERSION}
|
||||
${PROJECT}.1 ${SOURCE} ${PROJECT}-${VERSION} \
|
||||
${PROJECT}.pc.in
|
||||
@tar -cf ${PROJECT}-${VERSION}.tar ${PROJECT}-${VERSION}
|
||||
@gzip ${PROJECT}-${VERSION}.tar
|
||||
@rm -rf ${PROJECT}-${VERSION}
|
||||
|
||||
install: all
|
||||
install: all ${PROJECT}.pc
|
||||
@echo installing executable file
|
||||
@mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||
@cp -f ${PROJECT} ${DESTDIR}${PREFIX}/bin
|
||||
|
@ -71,6 +78,9 @@ install: all
|
|||
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
||||
@sed "s/VERSION/${VERSION}/g" < ${PROJECT}.1 > ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
|
||||
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
|
||||
@echo installing pkgconfig file
|
||||
@mkdir -p ${DESTDIR}${PREFIX}/lib/pkgconfig
|
||||
@cp -f ${PROJECT}.pc ${DESTDIR}${PREFIX}/lib/pkgconfig
|
||||
|
||||
uninstall:
|
||||
@echo removing executable file
|
||||
|
@ -80,6 +90,8 @@ uninstall:
|
|||
@rm -f ${DESTDIR}${PREFIX}/include/${PROJECT}/zathura.h
|
||||
@echo removing manual page
|
||||
@rm -f ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
|
||||
@echo removing pkgconfig file
|
||||
@rm -f ${DESTDIR}${PREFIX}/lib/pkgconfig
|
||||
|
||||
-include $(wildcard .depend/*.dep)
|
||||
|
||||
|
|
9
zathura.pc.in
Normal file
9
zathura.pc.in
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
INC_PATH=-I${includedir}
|
||||
|
||||
Name: ${project}
|
||||
Description: document viewer
|
||||
Version: ${version}
|
||||
URL: http://pwmt.org/projects/zathura
|
||||
Cflags: ${INC_PATH}
|
||||
Libs:
|
Loading…
Reference in a new issue