blob: b798215c60e30601967aae27e35370357f5a29b7 (
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
%define rpmlibdir %{_prefix}/lib
%define rpmhome %{rpmlibdir}/rpm
Name: librpm-tizen
Summary: The RPM libraries for git-buildpackage
License: GPL-2.0+
Group: Development/Tools/Building
Version: 4.11.0.1.tizen20130618
Release: 0
Url: http://www.rpm.org
BuildRequires: binutils
BuildRequires: bzip2
BuildRequires: file-devel
BuildRequires: findutils
BuildRequires: gcc
BuildRequires: glibc-devel
BuildRequires: gzip
BuildRequires: libtool
BuildRequires: make
BuildRequires: patch
%if 0%{?fedora}
BuildRequires: popt-devel
%else
BuildRequires: pkgconfig(popt)
%endif
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(nss)
BuildRequires: pkg-config
BuildRequires: pkgconfig(python) >= 2.6
# Disable security
%if 0
BuildRequires: uthash-devel
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libsmack)
%endif
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
BuildRequires: db-devel
Source4: rpm-tizen_macros
Source8: rpmconfigcheck
Source13: find-docs.sh
Source22: device-sec-policy
Source23: find-provides.ksyms
Source1001: rpm.manifest
Source0: rpm-%{version}.tar.gz
#
# avoid bootstrapping problem
%define _binary_payload w9.bzdio
#
# Python module name
%define python_mod_name rpm_tizen
%description
RPM Package Manager is the main tool for managing the software packages
of Tizen.
RPM can be used to install and remove software packages. With rpm, it
is easy to update packages. RPM keeps track of all these manipulations
in a central database. This way it is possible to get an overview of
all installed packages. RPM also supports database queries.
This is a special stripped-down version of RPM, only intended to be used by the
git-buildpackage tool. This package doesn't interfere with the RPM libraries of
the host system and it only contains rpmlib and rpm-python.
%prep
%setup -q -n rpm-%{version}
cp %{SOURCE1001} .
rm -rf sqlite
if [ -s %{_sysconfdir}/rpm/tizen_macros ]; then
cp -a %{_sysconfdir}/rpm/tizen_macros %{SOURCE4}
fi
cp -a %{SOURCE4} tizen_macros
rm -f m4/libtool.m4
rm -f m4/lt*.m4
%build
CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
export CPPFLAGS
export CFLAGS="%{optflags} -ffunction-sections"
export LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic-functions -ffunction-sections"
%ifarch armv5tel
export CFLAGS="-g -O0 -fno-strict-aliasing -ffunction-sections"
%endif
autoreconf -i -f
%configure \
--libdir=%{_libdir}/%{name} \
--disable-dependency-tracking \
--without-lua \
--without-acl \
--without-cap \
--enable-shared \
--enable-python \
--without-msm \
--with-external-db \
PYTHON_MODULENAME=%{python_mod_name}
make %{?_smp_mflags}
%install
# Install into a temporary location
make install DESTDIR="`pwd`/tmp_install"
# And only copy the files that we want
install -d %{buildroot}%{_libdir}/%{name}
install -d %{buildroot}%{python_sitearch}
cp -ax tmp_install/%{_libdir}/%{name} %{buildroot}%{_libdir}/
cp -ax tmp_install/%{python_sitearch}/%{python_mod_name} %{buildroot}%{python_sitearch}/
# Delete unwanted development files etc.
find %{buildroot} -name "*.la" | xargs rm -f --
find %{buildroot}/%{_libdir}/%{name} -name "*.so" | xargs rm -f --
rm -rf "%{buildroot}%{_libdir}/%{name}/pkgconfig"
rm -rf "%{buildroot}%{_libdir}/%{name}/rpm-plugins"
# Compile python modules (Fedora does this automatically) and find duplicates
%if 0%{?suse_version}
%py_compile %{buildroot}/%{python_sitearch}/%{python_mod_name}/
%py_compile -O %{buildroot}/%{python_sitearch}/%{python_mod_name}/
%fdupes %{buildroot}/%{python_sitearch}/
%endif
%files
%defattr(-,root,root,-)
%dir %{_libdir}/%{name}
%dir %{python_sitearch}/%{python_mod_name}/
%{_libdir}/%{name}/*.so.*
%{_libdir}/%{name}/rpm
%{python_sitearch}/%{python_mod_name}/*
|