]> git.pld-linux.org Git - packages/apport.git/blob - apport.spec
330a721ce50ebf27912a1a41482c4d34ddcec97d
[packages/apport.git] / apport.spec
1 Summary:        Read, write, and modify problem reports
2 Name:           apport
3 Version:        0.108.2
4 Release:        4
5 License:        GPL
6 Group:          Applications/System
7 Source0:        https://launchpad.net/ubuntu/hardy/+source/apport/%{version}/+files/%{name}_%{version}.tar.gz
8 # Source0-md5:  b2eb9a3b1168329ae7cdeb2a988d3443
9 Source1:        %{name}.init
10 Source2:        %{name}-backend-pld.py
11 Patch0:         %{name}-pager.patch
12 Patch1:         %{name}-crashdb.patch
13 Patch2:         %{name}-gtk-glade.patch
14 URL:            https://wiki.ubuntu.com/Apport
15 BuildRequires:  gettext-devel
16 BuildRequires:  intltool
17 BuildRequires:  python-devel >= 1:2.5
18 BuildRequires:  python-modules
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.268
21 #BuildRequires: tetex-format-pdflatex
22 #BuildRequires: tetex-latex
23 Requires(post,postun):  hicolor-icon-theme
24 Requires(post,postun):  shared-mime-info
25 Requires(post,preun):   /sbin/chkconfig
26 Requires:       lsb-release
27 Requires:       python-launchpad-bugs
28 Requires:       python-rpm
29 Requires:       rc-scripts
30 Requires:       yum
31 # Need the ability to use pipes in /proc/sys/kernel/core_pattern
32 # seems only 2.6.24 allows command line params
33 Requires:       uname(release) >= 2.6.24
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 apport automatically collects data from crashed processes and compiles
39 a problem report in /var/crash/.
40
41 This package also provides apport's python libraries and a command
42 line frontend for browsing and handling the crash reports.
43
44 See <https://wiki.ubuntu.com/AutomatedProblemReports> for more
45 information.
46
47 %package gtk
48 Summary:        GTK frontend for the apport crash report system
49 Group:          Applications/System
50 Requires:       procps
51 Requires:       python-pygtk-glade
52 Requires:       python-pygtk-gtk
53 Requires:       python-pyxdg
54
55 %description gtk
56 apport automatically collects data from crashed processes and compiles
57 a problem report in /var/crash/.
58
59 This package provides a GTK frontend for browsing and handling the
60 crash reports.
61
62 %package qt
63 Summary:        Qt4 frontend for the apport crash report system
64 Group:          Applications/System
65 Requires:       procps
66 Requires:       python-PyQt4
67 Requires:       python-pyxdg
68
69 %description qt
70 apport automatically collects data from crashed processes and compiles
71 a problem report in /var/crash/.
72
73 This package provides a Qt4 frontend for browsing and handling the
74 crash reports.
75
76 %package retrace
77 Summary:        Tools for reprocessing Apport crash reports
78 Group:          Applications/System
79
80 %description retrace
81 apport-retrace recombines an Apport crash report (either a file or a
82 Launchpad bug) and debug symbol packages (.ddebs) into fully symbolic
83 stack traces.
84
85 This package also ships apport-chroot. This tool can create and manage
86 chroots for usage with apport-retrace. If the fakeroot and fakechroot
87 libraries are available (either by installing the packages or by
88 merely putting their libraries somewhere and setting two environment
89 variables), the entire process of retracing crashes in chroots can
90 happen with normal user privileges.
91
92 %prep
93 %setup -q -n hardy
94 %patch0 -p1
95 %patch1 -p1
96 %patch2 -p1
97
98 # only used by debian
99 rm apport/packaging.py
100
101 # set up the packaging backend
102 cp backends/packaging_rpm.py apport
103 cp %{SOURCE2} apport/packaging_pld.py
104 ln -s packaging_pld.py apport/packaging_impl.py
105
106 %build
107 python setup.py build
108 %{__make} -C po
109 %{__make} -C gtk
110 %{__make} -C qt4
111
112 #%{__make} -C doc
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116 python setup.py install \
117         --optimize=2 \
118         --root=$RPM_BUILD_ROOT
119
120 %py_postclean
121
122 # Do the man pages
123 install -d $RPM_BUILD_ROOT%{_mandir}/man1
124 install man/apport-*.1 $RPM_BUILD_ROOT%{_mandir}/man1
125 # cron job
126 install -d $RPM_BUILD_ROOT/etc/cron.daily
127 install debian/apport.cron.daily $RPM_BUILD_ROOT/etc/cron.daily/apport
128 # create the dir for crash reports
129 install -d $RPM_BUILD_ROOT/var/crash
130 # install initscript
131 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
132 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/apport
133
134 # KDE integration
135 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_datadir}/mimelnk/text}
136 # application
137 cp -a qt4/apport-qt.desktop $RPM_BUILD_ROOT%{_desktopdir}
138 # mimetype and associated action
139 cp -a qt4/apport-qt-mimelnk.desktop $RPM_BUILD_ROOT%{_datadir}/mimelnk/text/x-apport.desktop
140 cp -a qt4/apport-qt-mime.desktop $RPM_BUILD_ROOT%{_desktopdir}
141
142 rm -f $RPM_BUILD_ROOT%{_docdir}/apport/package-hooks.txt
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %post
148 /sbin/chkconfig --add apport
149 %service apport restart
150 %update_mime_database
151 %update_icon_cache hicolor
152
153 %preun
154 if [ "$1" == "0" ]; then
155         %service apport stop
156         /sbin/chkconfig --del apport
157 fi
158
159 %update_mime_database
160 %update_icon_cache hicolor
161
162 %files
163 %defattr(644,root,root,755)
164 %doc doc/package-hooks.txt
165 %dir /var/crash
166 %{_mandir}/man1/*
167 %{_iconsdir}/hicolor/*/apps/apport.svg
168 %{_datadir}/mime/packages/apport.xml
169 %{py_sitescriptdir}/apport-*.egg-info
170 %dir %{_datadir}/apport
171 %attr(755,root,root) %{_bindir}/apport
172 %attr(755,root,root) %{_bindir}/apport-cli
173 %attr(755,root,root) %{_bindir}/gcc_ice_hook
174 %attr(755,root,root) %{_bindir}/apport-checkreports
175 %attr(755,root,root) %{_bindir}/package_hook
176 %attr(755,root,root) %{_bindir}/kernel_hook
177 %attr(755,root,root) %{_bindir}/apport-unpack
178 %attr(755,root,root) %{_datadir}/apport/testsuite/
179 %dir %{_datadir}/apport/general-hooks/
180 %attr(755,root,root) %{_datadir}/apport/general-hooks/*.py
181 %dir %{_datadir}/apport/package-hooks/
182 %attr(755,root,root) %{_datadir}/apport/package-hooks/*.py
183 %{py_sitescriptdir}/apport_python_hook.py[co]
184 %{py_sitescriptdir}/problem_report*.py[co]
185 %dir %{py_sitescriptdir}/apport
186 %{py_sitescriptdir}/apport/*.py[co]
187 %dir %{py_sitescriptdir}/apport/crashdb_impl
188 %{py_sitescriptdir}/apport/crashdb_impl/*.py[co]
189 /etc/cron.daily/apport
190 %attr(754,root,root) /etc/rc.d/init.d/apport
191 %dir %{_sysconfdir}/apport
192 %config %{_sysconfdir}/apport/crashdb.conf
193 %{_sysconfdir}/apport/blacklist.d
194
195 %files gtk
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_bindir}/apport-gtk
198 %{_datadir}/apport/apport-gtk.glade
199
200 %files qt
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_bindir}/apport-qt
203 %{_datadir}/apport/*.ui
204 %{_desktopdir}/apport-qt.desktop
205 %{_desktopdir}/apport-qt-mime.desktop
206 %{_datadir}/mimelnk/text/x-apport.desktop
207
208 %files retrace
209 %defattr(644,root,root,755)
210 %{_mandir}/man1/apport-retrace.1*
211 %attr(755,root,root) %{_bindir}/apport-retrace
212 %attr(755,root,root) %{_bindir}/apport-chroot
213 %attr(755,root,root) %{_bindir}/dupdb-admin
This page took 0.068323 seconds and 2 git commands to generate.