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