%define destdir %buildroot %global myhome / Buildroot: /tmp/%name-root Copyright: Check with djb@cr.yp.to Group: Utilities/System Name: checkpassword Packager: mw@csi.hu Provides: CHECKPASSWORD Release: 1memphis Source: ftp://cr.yp.to/checkpwd//%name-%version.tar.gz Summary: Password checking software URL: http://cr.yp.to/checkpwd.html Version: 0.90 %description checkpassword provides a simple, uniform password-checking interface to all root applications. It is suitable for use by applications such as login, ftpd, and pop3d. There are checkpassword-compatible tools that support alternate password databases, secret login names, long passwords, subaccounts, one-time passwords, detailed accounting, and many other features. Applications that use the checkpassword interface will work with all of these tools. Several tools have been specifically designed to support POP toasters. %prep %setup %build echo %myhome > conf-home make COMPILER="Compiler: $(gcc -v 2>& 1| tail -1)" HARDWARE="Hardware: $(uname -m)" LIBRARY="Library: $(rpm -q glibc)" OSVERSION="OSversion: $(uname -sr)" PACKAGER="Packager: %packager" REDHATRELEASE="RedHat release: $(cat /etc/redhat-release)" RPMVERSION="rpm version: $(rpm -q rpm)" echo "The %name rpm was created in the following environment: " > README.rpm echo "$COMPILER $HARDWARE $LIBRARY $OSVERSION $PACKAGER $REDHATRELEASE $RPMVERSION The packager above has made a good-faith attempt to ensure that the package behaves correctly." >> README.rpm if test "%myhome" != "/"; then echo "" >> README.rpm echo "You cannot distribute this rpm publicly" >> README.rpm fi %install rm -rf %destdir # The next steps make sure that instcheck and install # will do their job in %destdir%myhome and not # in %myhome mkdir -p %destdir%myhome/bin echo %destdir%myhome > conf-home make install instcheck ./install ./instcheck %clean rm -rf %destdir %files %defattr(-,root,root) %doc CHANGES README* %doc TODO VERSION %myhome/bin/*