summaryrefslogtreecommitdiffstats
path: root/debuginfofs.spec
blob: 6fd2bb091aa517d071627d7c02e786e995c5e871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Name:           debuginfofs
Version:        0.1
Release:        2%{?dist}
Summary:        Network-mountable filesystem for debuginfo

Group:          Development/Debuggers
License:        GPLv2+
URL:            http://fedorapeople.org/gitweb?p=wwoods/public_git/debuginfofs.git
Source0:        %{name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

Requires:         davfs2
Requires(post):   chkconfig
Requires(preun):  chkconfig
Requires(preun):  initscripts
Requires(postun): initscripts

%description
debuginfofs is a network-mountable filesystem that provides the debugging
symbols needed to generate a fully annotated backtrace.

%package server
Summary:        Server setup for debuginfofs
Group:          Development/Debuggers
Requires:         rpm cpio httpd
Requires(post):   chkconfig
Requires(preun):  chkconfig
Requires(preun):  initscripts
Requires(postun): initscripts

%description server
Server tools and config files for running a debuginfofs server

%prep
%setup -q


%build
# not needed

%install
rm -rf $RPM_BUILD_ROOT
# client
mkdir -p $RPM_BUILD_ROOT{%{_initrddir},/etc/sysconfig}
install -m 0755 debuginfofs.init $RPM_BUILD_ROOT%{_initrddir}/debuginfofs
install -m 0644 debuginfofs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/debuginfofs
install -m 0644 davfs2-debuginfofs.conf $RPM_BUILD_ROOT/etc/davfs2
# server
mkdir -p $RPM_BUILD_ROOT{/usr/share/debuginfofs,/usr/sbin}
mkdir -p $RPM_BUILD_ROOT/var/{www,cache}/debuginfofs
install -m 0755 debuginfofs-mirror $RPM_BUILD_ROOT/usr/sbin
#uncomment when this is ready
#install -m 0755 repofs.py $RPM_BUILD_ROOT/usr/sbin
install -m 0644 debuginfofs.conf $RPM_BUILD_ROOT/etc
install -m 0644 dav-debuginfo.conf $RPM_BUILD_ROOT/usr/share/debuginfofs
install -m 0755 debuginfofs-server.init $RPM_BUILD_ROOT%{_initrddir}/debuginfofs-server

 
%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add debuginfofs
%preun
if [ "$1" == "0" ] ; then
    /sbin/service debuginfofs stop >/dev/null 2>&1
    /sbin/chkconfig --del debuginfofs
fi
%postun
if [ "$1" -ge "1" ] ; then
    /sbin/service debuginfofs condrestart >/dev/null 2>&1 || :
fi

%post server
/sbin/chkconfig --add debuginfofs-server
%preun server
if [ "$1" == "0" ] ; then
    /sbin/service debuginfofs-server stop >/dev/null 2>&1
    /sbin/chkconfig --del debuginfofs-server
fi
%postun server
if [ "$1" -ge "1" ] ; then
    /sbin/service debuginfofs-server condrestart >/dev/null 2>&1 || :
fi


%files
%defattr(-,root,root,-)
%doc README.client
%{_initrddir}/debuginfofs
%config(noreplace) /etc/sysconfig/debuginfofs

%files server
%defattr(-,root,root,-)
%doc README TODO COPYING
%dir /var/www/debuginfofs
%dir /var/cache/debuginfofs
%{_initrddir}/debuginfofs-server
%config(noreplace) /etc/debuginfofs.conf
%config(noreplace) /usr/share/debuginfofs/dav-debuginfo.conf
%{_sbindir}/debuginfofs-mirror

%changelog
* Wed Mar 04 2009 Will Woods <wwoods@redhat.com> - 0.1-2
- Switch to davfs2, add debuginfofs-server service

* Tue Mar 03 2009 Will Woods <wwoods@redhat.com> - 0.1-1
- Package Review: Add COPYING, fix up initscript, clean up specfile

* Mon Feb 23 2009 Will Woods <wwoods@redhat.com> - 0.1-0
- Initial package creation