SPECS: drbd24.spec (NEW) - new, based on drbd.spec
zbyniu
zbyniu at pld-linux.org
Sun Oct 2 00:34:10 CEST 2005
Author: zbyniu Date: Sat Oct 1 22:34:10 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- new, based on drbd.spec
---- Files affected:
SPECS:
drbd24.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SPECS/drbd24.spec
diff -u /dev/null SPECS/drbd24.spec:1.1
--- /dev/null Sun Oct 2 00:34:10 2005
+++ SPECS/drbd24.spec Sun Oct 2 00:34:04 2005
@@ -0,0 +1,220 @@
+# $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without dist_kernel # allow non-distribution kernel
+%bcond_without kernel # don't build kernel modules
+%bcond_without smp # don't build SMP module
+%bcond_without userspace # don't build userspace module
+%bcond_with verbose # verbose build (V=1)
+#
+Summary: drbd is a block device designed to build high availibility clusters
+Summary(pl): drbd jest urządzeniem blokowym dla klastrów o wysokiej niezawodności
+Name: drbd24
+Version: 0.7.13
+%define rel 1
+Release: %{rel}
+License: GPL
+Group: Base/Kernel
+Source0: http://oss.linbit.com/drbd/0.7/drbd-%{version}.tar.gz
+# Source0-md5: bd25ec57d91b39705217f196fc7c8561
+URL: http://www.drbd.org/
+BuildRequires: bison
+BuildRequires: flex
+%{?with_dist_kernel:BuildRequires: kernel-module-build}
+BuildRequires: rpmbuild(macros) >= 1.118
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _kernelsrcdir /usr/src/linux-2.4
+%description
+drbd is a block device which is designed to build high availability
+clusters. This is done by mirroring a whole block device via (a
+dedicated) network. You could see it as a network RAID1.
+
+%description -l pl
+drbd jest urządzeniem blokowym zaprojektowanym dla klastrów o wysokiej
+niezawodności. drbd działa jako mirroring całego urządzenia blokowego
+przez (dedykowaną) sieć. Może być widoczny jako sieciowy RAID1.
+
+%description -l pt_BR
+O DRBD é um dispositivo de bloco que é projetado para construir
+clusters de Alta Disponibilidade. Isto é feito espelhando um
+dispositivo de bloco inteiro via rede (dedicada ou năo). Pode ser
+visto como um RAID 1 via rede. Este pacote contém utilitários para
+gerenciar dispositivos DRBD.
+
+%package -n drbdsetup24
+Summary: Setup tool and scripts for DRBD
+Summary(pl): Narzędzie konfiguracyjne i skrypty dla DRBD
+Summary(pt_BR): Utilitários para gerenciar dispositivos DRBD
+Group: Applications/System
+PreReq: rc-scripts
+Requires(post,preun): /sbin/chkconfig
+Conflicts: drbdsetup
+
+%description -n drbdsetup24
+Setup tool and init scripts for DRBD.
+
+%description -n drbdsetup24 -l pl
+Narzędzie konfiguracyjne i skrypty startowe dla DRBD.
+
+%package -n kernel24-block-drbd
+Summary: Kernel module with drbd - a block device designed to build high availibility clusters
+Summary(pl): Moduł jądra do drbd - urządzenia blokowego dla klastrów o wysokiej niezawodności
+Release: %{rel}@%{_kernel_ver_str}
+Group: Base/Kernel
+%{?with_dist_kernel:%requires_releq_kernel_up}
+Requires(post,postun): /sbin/depmod
+Requires: drbdsetup
+
+%description -n kernel24-block-drbd
+drbd is a block device which is designed to build high availability
+clusters. This is done by mirroring a whole block device via (a
+dedicated) network. You could see it as a network RAID1.
+
+%description -n kernel24-block-drbd -l pl
+drbd jest urządzeniem blokowym zaprojektowanym dla klastrów o wysokiej
+niezawodności. drbd działa jako mirroring całego urządzenia blokowego
+przez (dedykowaną) sieć. Może być widoczny jako sieciowy RAID1.
+
+%package -n kernel24-smp-block-drbd
+Summary: SMP kernel module with drbd - a block device designed to build high availibility clusters
+Summary(pl): Wersja SMP Modułu jądra do drbd - urządzenia blokowego dla klastrów o wysokiej niezawodności
+Release: %{rel}@%{_kernel_ver_str}
+Group: Base/Kernel
+%{?with_dist_kernel:%requires_releq_kernel_smp}
+Requires(post,postun): /sbin/depmod
+Requires: drbdsetup24
+
+%description -n kernel24-smp-block-drbd
+drbd is a block device which is designed to build high availability
+clusters. This is done by mirroring a whole block device via (a
+dedicated) network. You could see it as a network RAID1.
+
+%description -n kernel24-smp-block-drbd -l pl
+drbd jest urządzeniem blokowym zaprojektowanym dla klastrów o wysokiej
+niezawodności. drbd działa jako mirroring całego urządzenia blokowego
+przez (dedykowaną) sieć. Może być widoczny jako sieciowy RAID1.
+
+%prep
+%setup -q -n drbd-%{version}
+
+%build
+%if %{with userspace}
+%{__make} tools \
+ CC="%{__cc}"
+%endif
+
+%if %{with kernel}
+cd drbd
+
+# PLD kernels have 'find_first_bit' definition in include/asm/bitops.h
+%define _addon %{?with_dist_kernel:"-DHAVE_FIND_NEXT_BIT"}
+
+sed -i 's/^include/#include/' Makefile-2.4
+ln -sf Makefile-2.4 Makefile
+# kernel module(s)
+%{__make} \
+ CC="%{kgcc}" \
+ CFLAGS="-D__KERNEL__ -DMODULE %{_addon} -I%{_kernelsrcdir}/include -I." \
+ CONFIG_BLK_DEV_DRBD=m HAVE_FIND_NEXT_BIT=1
+ mv drbd.o drbd-up.o
+%if %{with smp} && %{with dist_kernel}
+%{__make} \
+ CC="%{kgcc}" \
+ CFLAGS="-D__KERNEL_SMP=1 -D__SMP__ -DMODULE -I%{_kernelsrcdir}/include -I." \
+ CONFIG_BLK_DEV_DRBD=m
+ mv drbd.o drbd-smp.o
+%endif
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man{5,8},%{_sysconfdir}} \
+ $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/ha.d/resource.d}
+
+%if %{with kernel}
+install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
+install drbd/drbd-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.o \
+ $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/drbd.o
+%if %{with smp} && %{with dist_kernel}
+install drbd/drbd-smp.o \
+ $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/drbd.o
+%endif
+%endif
+
+%if %{with userspace}
+install user/{drbdadm,drbdsetup} $RPM_BUILD_ROOT/sbin
+install scripts/drbd.conf $RPM_BUILD_ROOT%{_sysconfdir}
+install scripts/drbd $RPM_BUILD_ROOT/etc/rc.d/init.d
+
+ln -sf /etc/rc.d/init.d/drbd $RPM_BUILD_ROOT/etc/ha.d/resource.d/datadisk
+
+install documentation/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
+install documentation/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -n kernel24-block-drbd
+%depmod %{_kernel_ver}
+
+%postun -n kernel24-block-drbd
+%depmod %{_kernel_ver}
+
+%post -n kernel24-smp-block-drbd
+%depmod %{_kernel_ver}smp
+
+%postun -n kernel24-smp-block-drbd
+%depmod %{_kernel_ver}smp
+
+%post -n drbdsetup24
+/sbin/chkconfig --add drbd
+if [ -f /var/lock/subsys/drbd ]; then
+ /etc/rc.d/init.d/drbd restart >&2
+else
+ echo "Run \"/etc/rc.d/init.d/drbd start\" to start drbd service." >&2
+fi
+
+%preun -n drbdsetup24
+if [ "$1" = "0" ]; then
+ if [ -f /var/lock/subsys/drbd ]; then
+ /etc/rc.d/init.d/drbd stop
+ fi
+ /sbin/chkconfig --del drbd
+fi
+
+%if %{with userspace}
+%files -n drbdsetup24
+%defattr(644,root,root,755)
+%doc documentation/*.txt
+%attr(755,root,root) /sbin/*
+%attr(754,root,root) /etc/rc.d/init.d/drbd
+%attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/datadisk
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drbd.conf
+%{_mandir}/man[58]/*
+%endif
+
+%if %{with kernel}
+%files -n kernel24-block-drbd
+%defattr(644,root,root,755)
+%doc ChangeLog README
+/lib/modules/%{_kernel_ver}/misc/*
+
+%if %{with smp} && %{with dist_kernel}
+%files -n kernel24-smp-block-drbd
+%defattr(644,root,root,755)
+%doc ChangeLog README
+/lib/modules/%{_kernel_ver}smp/misc/*
+%endif
+%endif
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2005/10/01 22:34:04 zbyniu
+- new, based on drbd.spec
+
================================================================
More information about the pld-cvs-commit
mailing list