]> git.pld-linux.org Git - packages/apport.git/blob - apport.spec
79a3e262733198562d03281aeef8eb9d9e8b8d4d
[packages/apport.git] / apport.spec
1 Summary:        Read, write, and modify problem reports
2 Name:           apport
3 Version:        0.108
4 Release:        0.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:  fce254253ad9a5f3d1dab91b48a82e5e
9 Source1:        %{name}.init
10 Source2:        %{name}-backend-pld.py
11 Patch0:         %{name}-pager.patch
12 Patch1:         %{name}-crashdb.patch
13 Patch2:         %{name}-sourcepackage.patch
14 URL:            https://wiki.ubuntu.com/Apport
15 BuildRequires:  gettext
16 BuildRequires:  intltool
17 BuildRequires:  python-devel >= 1:2.5
18 BuildRequires:  rpmbuild(macros) >= 1.268
19 #BuildRequires: tetex-format-pdflatex
20 #BuildRequires: tetex-latex
21 Requires(post,postun):  hicolor-icon-theme
22 Requires(post,postun):  shared-mime-info
23 Requires(post,preun):   /sbin/chkconfig
24 Requires:       lsb-release
25 Requires:       python-launchpad-bugs
26 Requires:       python-rpm
27 Requires:       rc-scripts
28 Requires:       yum
29 # Need the ability to use pipes in /proc/sys/kernel/core_pattern
30 # seems only 2.6.24 allows command line params
31 Requires:       uname(release) >= 2.6.24
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 apport automatically collects data from crashed processes and compiles
37 a problem report in /var/crash/.
38
39 This package also provides apport's python libraries and a command
40 line frontend for browsing and handling the crash reports.
41
42 See <https://wiki.ubuntu.com/AutomatedProblemReports> for more
43 information.
44
45 %package gtk
46 Summary:        GTK frontend for the apport crash report system
47 Group:          Applications/System
48 Requires:       procps
49 Requires:       python-pygtk-glade
50 Requires:       python-pygtk-gtk
51 Requires:       python-pyxdg
52
53 %description gtk
54 apport automatically collects data from crashed processes and compiles
55 a problem report in /var/crash/.
56
57 This package provides a GTK frontend for browsing and handling the
58 crash reports.
59
60 %package qt
61 Summary:        Qt4 frontend for the apport crash report system
62 Group:          Applications/System
63 Requires:       procps
64 Requires:       python-PyQt4
65 Requires:       python-pyxdg
66
67 %description qt
68 apport automatically collects data from crashed processes and compiles
69 a problem report in /var/crash/.
70
71 This package provides a Qt4 frontend for browsing and handling the
72 crash reports.
73
74 %package retrace
75 Summary:        Tools for reprocessing Apport crash reports
76 Group:          Applications/System
77
78 %description retrace
79 apport-retrace recombines an Apport crash report (either a file or a
80 Launchpad bug) and debug symbol packages (.ddebs) into fully symbolic
81 stack traces.
82
83 This package also ships apport-chroot. This tool can create and manage
84 chroots for usage with apport-retrace. If the fakeroot and fakechroot
85 libraries are available (either by installing the packages or by
86 merely putting their libraries somewhere and setting two environment
87 variables), the entire process of retracing crashes in chroots can
88 happen with normal user privileges.
89
90 %prep
91 %setup -qc
92 mv ubuntu/* .
93 %patch0 -p1
94 %patch1 -p1
95 %patch2 -p1
96
97 # only used by debian
98 rm apport/packaging.py
99
100 # set up the packaging backend
101 cp backends/packaging_rpm.py apport
102 cp %{SOURCE2} apport/packaging_pld.py
103 ln -s packaging_pld.py apport/packaging_impl.py
104
105 %build
106 python setup.py build
107 %{__make} -C po
108 %{__make} -C gtk
109 %{__make} -C qt4
110
111 #%{__make} -C doc
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115 python setup.py install \
116         --optimize=2 \
117         --root=$RPM_BUILD_ROOT \
118         --install-scripts %{_datadir}/apport
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) %{_datadir}/apport/apport
172 %attr(755,root,root) %{_datadir}/apport/apport-cli
173 %attr(755,root,root) %{_datadir}/apport/gcc_ice_hook
174 %attr(755,root,root) %{_datadir}/apport/apport-checkreports
175 %attr(755,root,root) %{_datadir}/apport/package_hook
176 %attr(755,root,root) %{_datadir}/apport/kernel_hook
177 %attr(755,root,root) %{_datadir}/apport/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) %{_datadir}/apport/apport-gtk
198 %{_datadir}/apport/apport-gtk.glade
199
200 %files qt
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_datadir}/apport/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) %{_datadir}/apport/apport-retrace
212 %attr(755,root,root) %{_datadir}/apport/apport-chroot
213 %attr(755,root,root) %{_datadir}/apport/dupdb-admin
This page took 0.045151 seconds and 2 git commands to generate.