1 # 2 # spec file for package SUNWslocate 3 # 4 # Copyright 2008 Sun Microsystems, Inc. 5 # This file and all modifications and additions to the pristine 6 # package are under the same license as the package itself. 7 # 8 %define owner wangke 9 # 10 %include Solaris.inc 11 12 %define OSR 9390:3.x 13 14 Name: SUNWslocate 15 Summary: Finds files on a system via a central database 16 Version: 3.1 17 License: GPL v2 18 Group: File Tools 19 Distribution: Java Desktop System 20 Vendor: Sun Microsystems, Inc. 21 SUNW_BaseDir: %{_basedir} 22 SUNW_Copyright: %{name}.copyright 23 BuildRoot: %{_tmppath}/%{name}-%{version}-build 24 Source: http://slocate.trakker.ca/files/slocate-%{version}.tar.gz 25 # date:2008-09-02 owner:wangke type:feature 26 Patch1: slocate-01-makefile.diff 27 # date:2008-09-02 owner:wangke type:feature 28 Patch2: slocate-02-string.diff 29 # date:2009-02-19 owner:wangke type:branding 30 Patch3: slocate-03-manpages.diff 31 32 Requires: SUNWcsl 33 Requires: SUNWcslr 34 Requires: SUNWlibmsr 35 Requires: %{name}-root 36 BuildRequires: SUNWhea 37 38 %description 39 Slocate is a security-enhanced version of locate. Just like locate, 40 slocate searches through a central database (updated regularly) 41 for files which match a given pattern. Slocate allows you to quickly 42 find files anywhere on your system. 43 44 %package root 45 Summary: %{summary} - / filesystem 46 SUNW_BaseDir: / 47 Requires: SUNWcsr 48 49 %prep 50 %setup -q -n slocate-%{version} 51 %patch1 -p1 52 %patch2 -p1 53 %patch3 -p1 54 55 %build 56 export CFLAGS="%optflags -I/usr/include/ast" 57 export LDFLAGS="/usr/lib/libast.so.1" 58 cd src 59 make 60 cd .. 61 62 63 %install 64 [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT 65 mkdir -p $RPM_BUILD_ROOT%{_bindir} 66 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 67 68 install src/slocate $RPM_BUILD_ROOT%{_bindir}/ 69 ln -s slocate $RPM_BUILD_ROOT%{_bindir}/updatedb 70 install doc/slocate.1 $RPM_BUILD_ROOT%{_mandir}/man1/ 71 install doc/updatedb.1 $RPM_BUILD_ROOT%{_mandir}/man1/ 72 chmod 644 $RPM_BUILD_ROOT%{_mandir}/man1/slocate.1 73 chmod 644 $RPM_BUILD_ROOT%{_mandir}/man1/updatedb.1 74 mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/slocate/samples 75 install debian/updatedb.conf $RPM_BUILD_ROOT%{_datadir}/doc/slocate/samples/ 76 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ 77 install debian/updatedb.conf $RPM_BUILD_ROOT%{_sysconfdir}/ 78 mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/slocate 79 80 %clean 81 [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT 82 83 %files 84 %defattr(-,root,bin) 85 %attr(2755,root,slocate) %{_bindir}/slocate 86 %attr(-,root,slocate) %{_bindir}/updatedb 87 %dir %attr (0755, root, sys) %{_datadir} 88 %dir %attr(0755, root, bin) %{_mandir} 89 %dir %attr(0755, root, bin) %{_mandir}/man1 90 %{_mandir}/man1/* 91 %dir %attr(0755, root, other) %{_datadir}/doc 92 %dir %attr(0755, root, bin) %{_datadir}/doc/slocate 93 %dir %attr(0755, root, bin) %{_datadir}/doc/slocate/samples 94 %attr (444, root, bin) %{_datadir}/doc/slocate/samples/updatedb.conf 95 %doc README 96 %doc(bzip2) LICENSE Changelog 97 98 %files root 99 %defattr (-, root, bin) 100 %attr (0755, root, sys) %dir %{_sysconfdir} 101 %attr (0644, root, root) %{_sysconfdir}/updatedb.conf 102 %defattr (-, root, sys) 103 %dir %{_localstatedir} 104 %dir %attr (0755, root, other) %{_localstatedir}/lib 105 %dir %attr (0750, root, slocate) %{_localstatedir}/lib/slocate 106 107 %changelog 108 * Thu Feb 19 2009 - Matt.Keenan@sun.com 109 - Add manpages patch for Attributes and ARC Comment 110 * Wed Sep 17 2008 - Jim.Li@sun.com 111 - Revised new copyright file 112 * Mon Jun 30 2008 - Jim.Li@sun.com 113 - initial release 114 115