Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= file
  5. PKG_VERSION:= 5.04
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= accade81ff1cc774904b47c72c8aeea0
  8. PKG_DESCR:= a file type guesser
  9. PKG_SECTION:= utils
  10. PKG_DEPENDS:= libmagic
  11. PKG_URL:= http://www.darwinsys.com/file
  12. PKG_SITES:= ftp://ftp.fu-berlin.de/unix/tools/file/ \
  13. ftp://ftp.astron.com/pub/file/
  14. PKG_SUBPKGS:= FILE LIBMAGIC LIBMAGIC_DEV
  15. PKGSD_LIBMAGIC:= file type guesser library
  16. PKGSC_LIBMAGIC:= libs
  17. PKGSD_LIBMAGIC_DEV:= file type guesser headers
  18. PKGSC_LIBMAGIC_DEV:= devel
  19. include ${TOPDIR}/mk/package.mk
  20. $(eval $(call PKG_template,FILE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  21. $(eval $(call PKG_template,LIBMAGIC,libmagic,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBMAGIC},${PKGSD_LIBMAGIC},${PKGSC_LIBMAGIC}))
  22. $(eval $(call PKG_template,LIBMAGIC_DEV,libmagic-dev,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBMAGIC_DEV},${PKGSD_LIBMAGIC_DEV},${PKGSC_LIBMAGIC_DEV}))
  23. pre-configure:
  24. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  25. ./configure --enable-static --disable-shared \
  26. --disable-warnings \
  27. );
  28. ${MAKE} -C ${WRKBUILD}
  29. ${INSTALL_BIN} ${WRKBUILD}/src/file ${WRKBUILD}/magic
  30. ${MAKE} -C ${WRKBUILD} clean
  31. file-install:
  32. ${INSTALL_DIR} ${IDIR_FILE}/usr/bin
  33. ${INSTALL_BIN} ${WRKINST}/usr/bin/file ${IDIR_FILE}/usr/bin
  34. libmagic-install:
  35. ${INSTALL_DIR} ${IDIR_LIBMAGIC}/usr/share/misc
  36. ${INSTALL_DATA} ${WRKINST}/usr/share/misc/magic.mgc \
  37. ${IDIR_LIBMAGIC}/usr/share/misc
  38. ${INSTALL_DIR} ${IDIR_LIBMAGIC}/usr/lib
  39. ${CP} ${WRKINST}/usr/lib/libmagic.so* ${IDIR_LIBMAGIC}/usr/lib
  40. libmagic-dev-install:
  41. ${INSTALL_DIR} ${IDIR_LIBMAGIC_DEV}/usr/include
  42. ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBMAGIC_DEV}/usr/include
  43. include ${TOPDIR}/mk/pkg-bottom.mk