rio: update to 0.2.0
[void-pkg.git] / common / hooks / post-install / 10-pkglint-devel-paths.sh
blobff9e0fc514d05a47e98b5b04354e010de46e5d14
1 # vim: set ts=4 sw=4 et:
3 # This hook executes the following tasks:
4 # - Looks on non -devel packages for files that should be in the -devel package
5 # - Searches for solinks (.so) and archives (.a) on usr/lib
6 # - Searches for executables in usr/bin that end with -config and a respective manpage
8 hook() {
9 local solink archive
11 if [[ "$pkgname" == *"-devel" ]]; then
12 return 0
15 if [[ "$subpackages" != *"-devel" ]]; then
16 return 0
19 for f in $(find $PKGDESTDIR -type d); do
20 case "${f#$PKGDESTDIR}" in
21 /usr/include)
22 msg_warn "usr/include should be in -devel package\n"
24 /usr/share/pkgconfig)
25 msg_warn "usr/share/pkgconfig should be in -devel package\n"
27 /usr/lib/pkgconfig)
28 msg_warn "usr/lib/pkgconfig should be in -devel package\n"
30 /usr/share/vala)
31 msg_warn "usr/share/vala should be in -devel package\n"
33 /usr/share/gir-1.0)
34 msg_warn "usr/share/gir-1.0 should be in -devel package\n"
36 /usr/share/man/man3)
37 msg_warn "usr/share/man/man3 should be in -devel package\n"
39 /usr/share/aclocal)
40 msg_warn "usr/share/aclocal should be in -devel package\n"
42 /usr/share/cmake)
43 msg_warn "usr/share/cmake should be in -devel package\n"
45 /usr/lib/cmake)
46 msg_warn "usr/lib/cmake should be in -devel package\n"
48 /usr/share/gtk-doc)
49 msg_warn "usr/share/gtk-doc should be in -devel package\n"
51 /usr/lib/qt5/mkspecs)
52 msg_warn "usr/lib/qt5/mkspecs should be in -devel package\n"
54 esac
55 done
57 if [ -n "$(find $PKGDESTDIR/usr/lib -maxdepth 1 -type l -iname '*.so' 2>/dev/null)" ]; then
58 solink=1
61 if [ -n "$(find $PKGDESTDIR/usr/lib -maxdepth 1 -type f -iname '*.a' 2>/dev/null)" ]; then
62 archive=1
65 if [ -d $PKGDESTDIR/usr/bin ]; then
66 for x in $(find $PKGDESTDIR/usr/bin -type f -executable -iname '*-config'); do
67 msg_warn "${x#$PKGDESTDIR\/} should be in -devel package\n"
68 done
71 if [ -d $PKGDESTDIR/usr/man/man1 ]; then
72 for m in $(find $PKGDESTDIR/usr/man/man1 -type f -iname '*-config.1'); do
73 msg_warn "${m#$PKGDESTDIR\/} should be in -devel package\n"
74 done
77 if [ -n "$solink" ]; then
78 msg_warn "usr/lib/*.so should be in -devel package\n"
81 if [ -n "$archive" ]; then
82 msg_warn "usr/lib/*.a should be in -devel package\n"