]> git.pld-linux.org Git - packages/partimage.git/blob - partimage.spec
- updated to 0.6.0
[packages/partimage.git] / partimage.spec
1
2 # (g)id for partimaged
3 %define         _id             93
4
5 Summary:        Utility to save partitions in a compressed image file
6 Summary(pl):    Narzêdzie do zapisu partycji w skompresowanych plikach
7 Name:           partimage
8 Version:        0.6.0
9 Release:        1
10 License:        GPL
11 Vendor:         François Dupoux <fdupoux@partimage.org>
12 Group:          Applications/System
13 Group(de):      Applikationen/System
14 Group(pl):      Aplikacje/System
15 Source0:        http://prdownloads.sourceforge.net/partimage/%{name}-%{version}.tar.bz2
16 Source1:        %{name}d.init
17 URL:            http://www.partimage.org/
18 BuildRequires:  automake
19 BuildRequires:  autoconf
20 BuildRequires:  bzip2-devel
21 BuildRequires:  e2fsprogs-devel
22 BuildRequires:  gettext-devel
23 BuildRequires:  newt-devel
24 BuildRequires:  slang-devel
25 BuildRequires:  zlib-devel
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Linux/UNIX utility to save partitions in a compressed image file
30 Partition Image is a Linux/UNIX partition imaging utility: it saves
31 partitions in the:
32
33   - Ext2FS   (the Linux standard)
34   - ReiserFS (a new, powerful journalling file system)
35   - NTFS     (Windows NT File System)
36   - FAT16/32 (DOS & Windows file systems)
37   - HPFS     (OS/2 File System)
38   - JFS      (IBM Jounalized File System for AIX)
39   - XFS      (SGI Jounalized File System for IRIX)
40   - HFS      (Hierarchical File System for MacOS)
41   - UFS      (*BSD, Solaris and NextStep file systems)
42
43 file system formats to an image file. Only used blocks are copied.
44 The image file can be compressed in the GZIP/BZIP2 formats to save
45 disk space, and splitted into multiple files to be copied on amovibles
46 floppies (ZIP for example), or burned on a CD-R ... This allows to 
47 save a full Linux/Windows system, with an only operation. When 
48 problems (viruses, crash, error, ...), you just have to restore, and
49 after several minutes, all your system is restored (boot, files, ...),
50 and fully working. This is very useful when installing the same
51 software on many machines: just install one of them, create an image,
52 and just restore the image on all other machines. Then, after the
53 first one, each installation is automatically made, and only require
54 a few minutes.
55
56 %description -l pl
57 Narzêdzie Linuksowe do zapisywania partycji w skompresowanych plikach.
58 Potrafi ono zapisywaæ partycje ext2, ReiserFS, NTFS, FAT16/32, HPFS,
59 XFS, JFS, HFS, UFS. Kopiowane s± tylko u¿ywane bloki. Plik wyj¶ciowy
60 mo¿e byæ podzielony na wiele mniejszych oraz kompresowany w formacie
61 gzip/bzip2 w celu zaoszczêdzenia miejsca.
62
63
64 %package server
65 Summary:        Partimage server
66 Summary(pl):    Partimage server
67 Group:          Applications/System
68 Requires:       %{name} = %{version}
69
70 %description server
71 Server for Partimage. Very alpha stage, don't use it!
72
73 %description server -l pl
74 Server dla Partimage.
75
76 %prep
77 %setup -q
78
79 %build
80 rm missing
81 gettextize --copy --force
82 aclocal -I macros
83 autoconf
84 automake -a -c
85
86 %configure \
87         --enable-nls \
88         --without-included-gettext \
89         --disable-ssl
90 %{__make}
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94
95 %{__make} -C src \
96         sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} \
97         DESTDIR=$RPM_BUILD_ROOT \
98         install \
99
100 %{__make} -C po \
101         DESTDIR=$RPM_BUILD_ROOT \
102         install
103
104 install -d $RPM_BUILD_ROOT/%{_sysconfdir}/partimaged
105 cat > $RPM_BUILD_ROOT/%{_sysconfdir}/partimaged/partimagedusers << EOF
106 #note, '#' intruduces comments
107 #add only users allowed to connect to partimaged
108 # (only one login per line)
109
110 #joe # user 'joe' is allowed to coonnect to partimaged
111 EOF
112 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
113 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/partimaged
114
115 gzip -9nf AUTHORS BOOT* ChangeLog README* THANKS TODO BUGS
116
117 %find_lang %{name}
118
119 %pre server
120 if [ -n "`/usr/bin/getgid partimag`" ]; then
121         if [ "`/usr/bin/getgid partimag`" != "%{_id}" ]; then
122                 echo "Warning: group partimag hasn't gid=%{_id}. Correct this before installing partimage." 1>&2
123                 exit 1
124         fi
125 else
126         /usr/sbin/groupadd -g %{_id} -r -f partimag
127 fi
128 if [ -n "`/bin/id -u partimag 2>/dev/null`" ]; then
129         if [ "`/bin/id -u partimag`" != "%{_id}" ]; then
130                 echo "Warning: user partimag hasn't uid=%{_id}. Corrent this before installing partimage." 1>&2
131                 exit 1
132         fi
133 else
134         /usr/sbin/useradd -u %{_id} -r -d /etc/partimaged -s /bin/false -c "Partimage server" -g partimag partimag 1>&2
135 fi
136
137 %post server
138 /sbin/chkconfig --add partimaged
139 if [ -f /var/lock/subsys/partimage ]; then
140         /etc/rc.d/init.d/partimage restart >&2
141 else
142         echo "Run \"/etc/rc.d/init.d/partimage start\" to start partimage server." >&2
143 fi
144
145 %preun server
146 if [ "$1" = "0" ]; then
147         if [ -f /var/lock/subsys/partimage ]; then
148                 /etc/rc.d/init.d/partimage stop >&2
149         fi
150         /sbin/chkconfig --del partimaged
151 fi
152
153 %postun server
154 if [ $1 = 0 ]; then
155         /usr/sbin/userdel partimag 2>/dev/null
156         /usr/sbin/groupdel partimag 2>/dev/null
157 fi
158
159 %clean
160 rm -rf $RPM_BUILD_ROOT
161
162 %files -f %{name}.lang
163 %defattr(644,root,root,755)
164 %doc {AUTHORS,BOOT*,ChangeLog,README,THANKS,TODO,BUGS}.gz
165 %attr(755,root,root) %{_sbindir}/*
166
167 %files server
168 %defattr(644,root,root,755)
169 %doc README.partimaged.gz
170 %attr(755,root,root) %{_sbindir}/*
171 %attr(754,root,root) /etc/rc.d/init.d/partimaged
172 %dir %{_sysconfdir}/partimaged
173 %attr(600,partimag,root) %config(noreplace) %{_sysconfdir}/partimaged/partimagedusers
This page took 0.44596 seconds and 3 git commands to generate.