Make gps-manager build against Tizen generic
[platform/core/location/gps-manager.git] / packaging / gps-manager.spec
1 Name:       gps-manager
2 Summary:    GPS Manager for Tizen
3 Version:    0.2.44
4 Release:    1
5 Group:      Location/Geolocation
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1:    gps-manager.service
9 Source2:    gps-manager.conf
10 Source1001: gps-manager.manifest
11 BuildRequires:  pkgconfig(glib-2.0)
12 BuildRequires:  pkgconfig(network)
13 BuildRequires:  pkgconfig(tapi)
14 BuildRequires:  pkgconfig(vconf)
15 BuildRequires:  pkgconfig(sysman)
16 BuildRequires:  pkgconfig(msg-service)
17 BuildRequires:  pkgconfig(dlog)
18 BuildRequires:  pkgconfig(pmapi)
19 BuildRequires:  pkgconfig(location)
20 BuildRequires:  pkgconfig(lbs-dbus)
21 BuildRequires:  pkgconfig(gio-unix-2.0)
22
23 %description
24 GPS Manager for Tizen
25
26
27 %package -n location-gps-manager
28 Summary:    GPS Manager for Tizen
29 Group:      Development/Libraries
30 Requires:   %{name} = %{version}-%{release}
31
32 %description -n location-gps-manager
33 GPS Manager for Tizen
34
35
36 %package -n gps-manager-plugin-devel
37 Summary:    GPS Manager for Tizen (development files)
38 Group:      Development/Libraries
39 Requires:   %{name} = %{version}-%{release}
40
41 %description -n gps-manager-plugin-devel
42 GPS Manager for Tizen (development files)
43
44
45 %prep
46 %setup -q
47 cp %{SOURCE1001} .
48
49 %ifarch %{arm}
50 %define GPS_ENABLER --enable-gps
51 %define ARCH armel
52 %else
53 %define GPS_ENABLER --enable-gps
54 %define ARCH x86
55 %endif
56
57 ./autogen.sh
58 ./configure --prefix=%{_prefix} --libdir=%{_libdir} %{GPS_ENABLER}
59
60
61 %build
62 make %{?jobs:-j%jobs}
63
64 %install
65 rm -rf %{buildroot}
66 %make_install
67
68 mkdir -p %{buildroot}/usr/lib/systemd/system/multi-user.target.wants
69 install -m 644 %{SOURCE1} %{buildroot}/usr/lib/systemd/system/gps-manager.service
70 ln -s ../gps-manager.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/gps-manager.service
71
72 # temoprary HW configuration. it should be seperated.
73 mkdir -p %{buildroot}/etc/sysconfig
74 install -m 644 %{SOURCE2} %{buildroot}/etc/sysconfig/gps-manager
75
76 %clean
77 rm -rf %{buildroot}
78
79
80 %post
81 #GPS Indicator value
82 vconftool set -t int memory/location/position/state "0" -i
83 vconftool set -t int memory/location/gps/state "0" -i
84 vconftool set -t int memory/location/wps/state "0" -i
85
86 #GPS_SETTING
87 vconftool set -t int db/location/gps/Operation "1" -f
88 vconftool set -t int db/location/gps/Starting "0" -f
89 vconftool set -t int db/location/gps/Session "1" -f
90
91 #SUPL_SETTING
92 vconftool set -t int db/location/supl/ServerFQDNType "0" -f
93 vconftool set -t string db/location/supl/Server "bcmls2.glpals.com" -f
94 vconftool set -t int db/location/supl/Port "7275" -f
95 vconftool set -t int db/location/supl/SslEnabled "0" -f
96
97 #NMEA_SETTING
98 vconftool set -t int db/location/nmea/LoggingEnabled "0" -f
99
100 #REPLAY_SETTING
101 vconftool set -t string db/location/replay/FileName "nmea_replay.log" -f
102 %ifarch %arm
103         vconftool set -t int db/location/replay/ReplayEnabled "0" -f
104         vconftool set -t int db/location/replay/ReplayMode "1" -f
105 %else
106         vconftool set -t int db/location/replay/ReplayEnabled "1" -f
107         vconftool set -t int db/location/replay/ReplayMode "0" -f
108 %endif
109 vconftool set -t double db/location/replay/ManualLatitude "0.0" -f
110 vconftool set -t double db/location/replay/ManualLongitude "0.0" -f
111 vconftool set -t double db/location/replay/ManualAltitude "0.0" -f
112
113 %post -n location-gps-manager
114 %ifnarch %arm
115         cp -f /usr/lib/location/module/libgps.so /usr/lib/location/module/libwps0.so
116 %endif
117
118 %postun -p /sbin/ldconfig
119
120 %files
121 %manifest %{name}.manifest
122 %defattr(-,root,root,-)
123 /usr/libexec/gps-manager
124 /usr/share/dbus-1/system-services/org.tizen.lbs.Providers.GpsManager.service
125 /usr/share/lbs/gps-manager.provider
126 /etc/rc.d/init.d/gps-manager
127 /etc/rc.d/rc3.d/S90gps-manager
128 /etc/rc.d/rc5.d/S90gps-manager
129 /usr/lib/systemd/system/gps-manager.service
130 /usr/lib/systemd/system/multi-user.target.wants/gps-manager.service
131 # temoprary HW configuration. it should be seperated.
132 /etc/sysconfig/gps-manager
133
134 %files -n location-gps-manager
135 %manifest %{name}.manifest
136 %defattr(-,root,root,-)
137 %{_libdir}/location/module/libgps.so*
138
139 %files -n gps-manager-plugin-devel
140 %manifest %{name}.manifest
141 %defattr(-,root,root,-)
142 %{_libdir}/pkgconfig/gps-manager-plugin.pc
143 %{_includedir}/gps-manager-plugin/*.h
144