Changes of Revision 18
[-] | Changed | flashcache.spec |
x 1
2 # norootforbuild 3 Summary: Write back block cache for SSD devices 4 Name: flashcache 5 -Version: 1.0.0 6 +Version: 2.0.0 7 License: GPL 8 Release: 74 9 Group: System/Kernel 10 Source0: %{name}-%{version}.tar.bz2 11 Source1: boot.flashcache 12 +Source2: mdwn2man 13 BuildRoot: %{_tmppath}/%{name}-%{version}-root 14 BuildRequires: kernel-source kernel-syms module-init-tools 15 BuildRequires: -post-build-checks 16
17 popd 18 19 %install 20 -rm -rf $RPM_BUILD_ROOT 21 export INSTALL_MOD_PATH=$RPM_BUILD_ROOT 22 export INSTALL_MOD_DIR=updates 23 for flavor in %flavors_to_build; do 24
25 pushd source/src/utils 26 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" 27 popd 28 +# build man pages 29 +pushd source/man 30 +%__install -d -m0755 %{buildroot}%{_mandir}/man8 31 +for a in `ls -1A *.mdwn` ; do 32 +b=`basename $a .mdwn` 33 +cat ${a} | %{S:2} > %{buildroot}%{_mandir}/man8/$b.8 34 +done 35 +popd 36 install -D -m0755 %{S:1} %{buildroot}%{_initdir}/boot.flashcache 37 38 %post 39
40 %postun 41 /sbin/depmod -a 42 43 +%postun utils 44 +if [ $1 == 0 ] ; then 45 +%insserv_cleanup 46 +fi 47 + 48 %post utils 49 if [ $1 == 1 ] ; then 50 /sbin/chkconfig boot.flashcache B || : 51
52 %preun utils 53 if [ $1 == 0 ] ; then 54 /sbin/chkconfig boot.flashcache off || : 55 +/sbin/service boot.flashcache stop || : 56 fi 57 58 %files utils 59
60 /sbin/flashcache_create 61 /sbin/flashcache_destroy 62 /sbin/flashcache_load 63 +/sbin/flashcache_setioctl 64 +/sbin/get_agsize 65 %{_initdir}/boot.flashcache 66 +%{_mandir}/man8/flashcache.8* 67 +%{_mandir}/man8/flashcache_create.8* 68 +%{_mandir}/man8/flashcache_destroy.8* 69 70 %changelog 71 + 72 |
||
Added | flashcache-2.0.0.tar.bz2 ^ | |
[+] | Added | mdwn2man ^ |
@@ -0,0 +1,44 @@ +#!/usr/bin/perl +# Warning: hack + +my $prog=shift; +my $section=shift; + +print ".TH $prog $section\n"; + +while (<>) { + s{(\\?)\[\[([^\s\|\]]+)(\|[^\s\]]+)?\]\]}{$1 ? "[[$2]]" : $2}eg; + s/\`//g; + s/^\s*\./\\&./g; + if (/^#\s/) { + s/^#\s/.SH /; + <>; # blank; + } + s/^[ \n]+//; + s/^\t/ /; + s/-/\\-/g; + s/^Warning:.*//g; + s/^$/.PP\n/; + s/^\*\s+(.*)/.IP "$1"/; + next if $_ eq ".PP\n" && $skippara; + if (/^.IP /) { + $inlist=1; + $spippara=0; + } + elsif (/.SH/) { + $skippara=0; + $inlist=0; + } + elsif (/^\./) { + $skippara=1; + } + else { + $skippara=0; + } + if ($inlist && $_ eq ".PP\n") { + $_=".IP\n"; + } + + print $_; +} + |