]> git.pld-linux.org Git - packages/cvsfs.git/blob - cvsfs.spec
- tabs in preamble
[packages/cvsfs.git] / cvsfs.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # without kernel from distribution
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_without  userspace       # don't build userspace tools
6 #
7 %define         _kernelsrcdir           /usr/src/linux-2.4
8 Summary:        CVSFS - CVS filesystem
9 Summary(pl.UTF-8):      CVSFS - system plikowy CVS
10 Name:           cvsfs
11 Version:        1.1.9
12 %define _rel    0.1
13 Release:        %{_rel}
14 License:        GPL
15 Group:          Applications/System
16 Source0:        http://dl.sourceforge.net/cvsfs/%{name}-%{version}.tar.gz
17 # Source0-md5:  622365b1b94e85653cec013fa43504d3
18 Patch0:         %{name}-Makefile.am.patch
19 Patch1:         %{name}-PPC.patch
20 Patch2:         %{name}-AXP.patch
21 URL:            http://sourceforge.net/projects/cvsfs/
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 %if %{with userspace}
25 BuildRequires:  libstdc++-devel
26 %endif
27 %if %{with kernel}
28 %{?with_dist_kernel:BuildRequires:      kernel24-headers}
29 %endif
30 BuildRequires:  rpmbuild(macros) >= 1.118
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 This provides a package which presents the CVS contents as mountable
35 file system. It allows to view the versioned files as like they were
36 ordinary files on a disk. There is also a possibility to check in/out
37 some files for editing.
38
39 %description -l pl.UTF-8
40 Ten pakiet zawiera narzędzia prezentujące zawartość repozytorium CVS
41 jako montowalny system plików. CVSFS umożliwia przeglądanie
42 wersjonowanych plików w taki sposób, jakby były zwykłymi plikami na
43 dysku. Jest także możliwość pobrania i zapisania plików po
44 zmodyfikowaniu.
45
46 %package -n kernel24-cvsfs
47 Summary:        CVSFS Linux kernel module
48 Summary(pl.UTF-8):      Moduł jądra Linuksa CVSFS
49 Release:        %{_rel}@%{_kernel_ver_str}
50 Group:          Base/Kernel
51 %{?with_dist_kernel:%requires_releq_kernel_up}
52 Requires(post,postun):  /sbin/depmod
53 Requires:       %{name} = %{version}-%{release}
54
55 %description -n kernel24-cvsfs
56 CVS FS Linux kernel module.
57
58 %description -n kernel24-cvsfs -l pl.UTF-8
59 Moduł jądra Linuksa CVS FS.
60
61 %package -n kernel24-smp-cvsfs
62 Summary:        CVSFS Linux SMP kernel module
63 Summary(pl.UTF-8):      Moduł jądra Linuksa SMP CVSFS
64 Release:        %{_rel}@%{_kernel_ver_str}
65 Group:          Base/Kernel
66 %{?with_dist_kernel:%requires_releq_kernel_smp}
67 Requires(post,postun):  /sbin/depmod
68 Requires:       %{name} = %{version}-%{release}
69
70 %description -n kernel24-smp-cvsfs
71 CVS FS module for Linux SMP kernel.
72
73 %description -n kernel24-smp-cvsfs -l pl.UTF-8
74 Moduł CVS FS dla jądra Linuksa SMP.
75
76 %prep
77 %setup -q
78 %patch0 -p0
79 %ifarch ppc
80 %patch1 -p1
81 %endif
82 %ifarch alpha
83 %patch2 -p1
84 %endif
85
86 %build
87 %{__aclocal}
88 %{__automake} --gnu
89 %{__autoconf}
90 %configure
91
92 %if %{with kernel}
93 %{__make} -C cvsfs \
94         CFLAGS="%{rpmcflags} -fomit-frame-pointer -Wall -D__SMP__ -D__KERNEL_SMP=1" \
95         INCLUDES="-I%{_kernelsrcdir}/include"
96 mv cvsfs/cvsfs.o cvsfs/cvsfs-smp.o
97 %{__make} -C cvsfs clean
98 %{__make} -C cvsfs \
99         CFLAGS="%{rpmcflags} -fomit-frame-pointer -Wall" \
100         INCLUDES="-I%{_kernelsrcdir}/include"
101 %endif
102
103 %if %{with userspace}
104 for d in cvsfsd cvsmnt cvsmount cvsumount include init tools ; do
105         %{__make} -C $d
106 done
107 %endif
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111
112 %if %{with kernel}
113 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/fs
114 install cvsfs/cvsfs.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/fs
115 install cvsfs/cvsfs-smp.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/fs/cvsfs.o
116 %endif
117
118 %if %{with userspace}
119 install -d $RPM_BUILD_ROOT%{_sbindir}
120 install cvsmnt/cvsmnt $RPM_BUILD_ROOT%{_sbindir}
121 install cvsmount/cvsmount $RPM_BUILD_ROOT%{_sbindir}
122 install cvsumount/cvsumount $RPM_BUILD_ROOT%{_sbindir}
123 %endif
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %post   -n kernel24-cvsfs
129 %depmod %{_kernel_ver}
130
131 %postun -n kernel24-cvsfs
132 %depmod %{_kernel_ver}
133
134 %post   -n kernel24-smp-cvsfs
135 %depmod %{_kernel_ver}smp
136
137 %postun -n kernel24-smp-cvsfs
138 %depmod %{_kernel_ver}smp
139
140 %if %{with userspace}
141 %files
142 %defattr(644,root,root,755)
143 %doc ChangeLog README
144 %attr(755,root,root) %{_sbindir}/*
145 %endif
146
147 %if %{with kernel}
148 %files -n kernel24-cvsfs
149 %defattr(644,root,root,755)
150 /lib/modules/%{_kernel_ver}/fs/cvsfs.o*
151
152 %files -n kernel24-smp-cvsfs
153 %defattr(644,root,root,755)
154 /lib/modules/%{_kernel_ver}smp/fs/cvsfs.o*
155 %endif
This page took 0.077406 seconds and 3 git commands to generate.