cmd5checkpw-0.30-r1.ebuild 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils fixheadtails user
  4. MY_VER="030"
  5. DESCRIPTION="A checkpassword compatible authentication program that used CRAM-MD5 authentication mode"
  6. SRC_URI="http://www.fehcom.de/qmail/auth/${PN}-${MY_VER}_tgz.bin"
  7. HOMEPAGE="http://www.fehcom.de/qmail/smtpauth.html"
  8. LICENSE="public-domain RSA"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
  11. IUSE=""
  12. DEPEND=""
  13. RDEPEND=""
  14. pkg_setup() {
  15. enewuser cmd5checkpw 212 -1 /dev/null bin
  16. ewarn
  17. ewarn "this version is in NO WAY COMPATIBLE with cmd5checkpw-0.2x"
  18. ewarn "it actually receives the authentication credentials"
  19. ewarn "in a different order then the old implementation"
  20. ewarn "see bug #100693 for details"
  21. ewarn "this version IS needed by >=qmail-1.03-r16"
  22. ewarn
  23. }
  24. src_unpack() {
  25. # The old code moved the file in DISTDIR, which is forbidden.
  26. # It's read-only.
  27. cd "${WORKDIR}"
  28. rm -f ${PN}-${MY_VER}.tar.gz
  29. ln -s "${DISTDIR}"/${PN}-${MY_VER}_tgz.bin ${PN}-${MY_VER}.tar.gz
  30. unpack ./${PN}-${MY_VER}.tar.gz
  31. cd "${S}"
  32. epatch "${FILESDIR}"/euid_${MY_VER}.diff
  33. epatch "${FILESDIR}"/reloc.diff
  34. sed -e 's:-c -g -Wall -O3:$(OPTCFLAGS):' -i Makefile
  35. ht_fix_file Makefile
  36. }
  37. src_compile() {
  38. emake OPTCFLAGS="${CFLAGS}" || die
  39. }
  40. src_install() {
  41. insinto /etc
  42. doins "${FILESDIR}"/poppasswd
  43. exeinto /bin
  44. doexe cmd5checkpw
  45. doman cmd5checkpw.8
  46. fowners cmd5checkpw /etc/poppasswd /bin/cmd5checkpw
  47. fperms 400 /etc/poppasswd
  48. fperms u+s /bin/cmd5checkpw
  49. }
  50. pkg_postinst() {
  51. chmod 400 "${ROOT}"/etc/poppasswd
  52. chown cmd5checkpw "${ROOT}"/etc/poppasswd
  53. }