]> git.pld-linux.org Git - packages/ccs.git/blob - ccs.spec
- add init scripts
[packages/ccs.git] / ccs.spec
1 Summary:        Cluster configuration system to manage the cluster config file
2 Summary(pl):    System konfiguracji klastra do zarz±dzania jego plikiem konfiguracyjnym
3 Name:           ccs
4 Version:        1.01.00
5 Release:        1
6 License:        GPL v2
7 Group:          Applications/System
8 Source0:        ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz
9 # Source0-md5:  e98551b02ee8ed46ae0ab8fca193d751
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 URL:            http://sources.redhat.com/cluster/ccs/
13 BuildRequires:  libxml2-devel >= 2.0
14 BuildRequires:  magma-devel >= 1.0
15 BuildRequires:  perl-base
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         _sbindir        /sbin
19
20 %description
21 Cluster configuration system to manage the cluster config file.
22
23 %description -l pl
24 System konfiguracji klastra do zarz±dzania jego plikiem
25 konfiguracyjnym.
26
27 %package devel
28 Summary:        Header files and static library for ccs
29 Summary(pl):    Pliki nag³ówkowe i biblioteka statyczna ccs
30 Group:          Development/Libraries
31 # doesn't require base
32
33 %description devel
34 Header files and static library for ccs.
35
36 %description devel -l pl
37 Pliki nag³ówkowe i biblioteka statyczna ccs.
38
39 %prep
40 %setup -q -n cluster-%{version}
41 cd %{name}
42 %{__perl} -pi -e 's/-O2/%{rpmcflags}/' {ccs_tool,ccs_test,lib,daemon}/Makefile
43
44 %build
45 cd %{name}
46 ./configure \
47         --incdir=%{_includedir} \
48         --libdir=%{_libdir} \
49         --mandir=%{_mandir} \
50         --prefix=%{_prefix} \
51         --sbindir=%{_sbindir}
52 %{__make} \
53         CC="%{__cc}"
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 cd %{name}
58 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
59
60 %{__make} install \
61         DESTDIR=$RPM_BUILD_ROOT
62
63 install -d $RPM_BUILD_ROOT%{_sysconfdir}/cluster
64 touch $RPM_BUILD_ROOT%{_sysconfdir}/cluster/cluster.xml
65
66 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
67 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %post
73 /sbin/chkconfig --add %{name}
74 if [ -f /var/lock/subsys/%{name} ]; then
75         /etc/rc.d/init.d/%{name} restart 1>&2
76 else
77         echo "Type \"/etc/rc.d/init.d/%{name} start\" to start %{name}" 1>&2
78 fi
79
80 %preun
81 if [ "$1" = "0" ]; then
82         if [ -f /var/lock/subsys/%{name} ]; then
83                 /etc/rc.d/init.d/%{name} stop >&2
84         fi
85         /sbin/chkconfig --del %{name}
86 fi
87
88 %files
89 %defattr(644,root,root,755)
90 %attr(755,root,root) %{_sbindir}/*
91 %dir %{_sysconfdir}/cluster
92 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cluster/cluster.xml
93 %{_mandir}/man5/cluster.conf.5*
94 %{_mandir}/man7/ccs.7*
95 %{_mandir}/man8/ccs*.8*
96 %attr(754,root,root) /etc/rc.d/init.d/%{name}
97 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/%{name}
98
99 %files devel
100 %defattr(644,root,root,755)
101 %{_includedir}/ccs.h
102 %{_libdir}/libccs.a
This page took 0.053593 seconds and 4 git commands to generate.