summaryrefslogtreecommitdiffstats
path: root/contrib/apt-conf/rtems-apt-conf.spec.in
blob: 8dd8bc6cf93a1cda669a5b2284f41959f991fece (plain) (blame)
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
Name:           @PACKAGE_NAME@
Version:        @VERSION@
Release:        0
Epoch:          0

License:        GPL
Source0:        @PACKAGE_NAME@-@VERSION@.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

Group:		RTEMS
Summary: 	Apt configuration for RTEMS
%description
Apt configuration files to access the apt repositories at ftp://ftp.rtems.com

%prep
%setup -q

%build
%configure

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%package -n rtems-4.6-apt-conf
Summary:        Apt configuration for RTEMS/4.6
Group:          RTEMS/4.6
Requires:       apt >= 0.5.15cnc1

%description -n rtems-4.6-apt-conf
Apt configuration for RTEMS/4.6

%files -n rtems-4.6-apt-conf
%defattr(-,root,root,-)
%{_sysconfdir}/apt/gpg
%{_sysconfdir}/apt/sources.list.d/rtems-4.6.list
%{_sysconfdir}/apt/vendors.list.d/rtems.list

%post -n rtems-4.6-apt-conf
if test -f %{_sysconfdir}/apt/sources.list; then
  cp %{_sysconfdir}/apt/sources.list %{_sysconfdir}/apt/sources.list.rpmsave
  sed '/rpm.*ftp:\/\/ftp\.rtems\.com.*redhat.*7\.3.*apt.*rtems-4\.6/d' \
    < %{_sysconfdir}/apt/sources.list.rpmsave \
    > %{_sysconfdir}/apt/sources.list
fi

%package -n rtems-4.7-apt-conf
Summary:        Apt configuration for RTEMS/4.7
Group:          RTEMS/4.7
Requires:       apt >= 0.5.15cnc1

%description -n rtems-4.7-apt-conf
Apt configuration for RTEMS/4.7

%files -n rtems-4.7-apt-conf
%defattr(-,root,root,-)
%{_sysconfdir}/apt/gpg
%{_sysconfdir}/apt/sources.list.d/rtems-4.7.list
%{_sysconfdir}/apt/vendors.list.d/rtems.list

%post -n rtems-4.7-apt-conf
if test -f %{_sysconfdir}/apt/sources.list; then
  cp %{_sysconfdir}/apt/sources.list %{_sysconfdir}/apt/sources.list.rpmsave
  sed '/rpm.*ftp:\/\/ftp\.rtems\.com.*redhat.*7\.3.*apt.*rtems-4\.7/d' \
    < %{_sysconfdir}/apt/sources.list.rpmsave \
    > %{_sysconfdir}/apt/sources.list
fi