diff options
author | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-13 01:51:50 +0900 |
---|---|---|
committer | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-13 01:51:50 +0900 |
commit | 5345c0311093385ac1386f9f1f8b6db9d6a46793 (patch) | |
tree | f77d1a3163d94af71eccff5d657a1a3529190082 /packaging | |
parent | 91545a9743ec602ae4d8d207836865850a3532f1 (diff) | |
download | power-manager-5345c0311093385ac1386f9f1f8b6db9d6a46793.tar.gz power-manager-5345c0311093385ac1386f9f1f8b6db9d6a46793.tar.bz2 power-manager-5345c0311093385ac1386f9f1f8b6db9d6a46793.zip |
Tizen 2.1 base
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/power-manager.manifest | 13 | ||||
-rw-r--r-- | packaging/power-manager.service | 10 | ||||
-rw-r--r-- | packaging/power-manager.spec | 83 |
3 files changed, 106 insertions, 0 deletions
diff --git a/packaging/power-manager.manifest b/packaging/power-manager.manifest new file mode 100644 index 0000000..e4d4971 --- /dev/null +++ b/packaging/power-manager.manifest @@ -0,0 +1,13 @@ +<manifest> + <define> + <domain name="power_manager"/> + </define> + <request> + <domain name="power_manager"/> + </request> + <assign> + <filesystem path="/etc/rc.d/init.d/pmctrl" label="_" exec_label="none" /> + <filesystem path="/etc/rc.d/rc3.d/S35power-manager" label="_" exec_label="none" /> + </assign> +</manifest> + diff --git a/packaging/power-manager.service b/packaging/power-manager.service new file mode 100644 index 0000000..13609c8 --- /dev/null +++ b/packaging/power-manager.service @@ -0,0 +1,10 @@ +[Unit] +Description=Start the power manager service + +[Service] +Type=forking +ExecStart=/usr/bin/pmctrl start +Environment=DISPLAY=:0 + +[Install] +WantedBy=multi-user.target diff --git a/packaging/power-manager.spec b/packaging/power-manager.spec new file mode 100644 index 0000000..0004a9c --- /dev/null +++ b/packaging/power-manager.spec @@ -0,0 +1,83 @@ +Name: power-manager +Summary: Power manager +Version: 1.3.23 +Release: 8 +Group: framework/system +License: APLv2 +Source0: %{name}-%{version}.tar.gz +Source1001: packaging/power-manager.manifest +Requires(post): /usr/bin/vconftool +Source1: power-manager.service +BuildRequires: cmake +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(vconf) +BuildRequires: pkgconfig(sysman) +BuildRequires: pkgconfig(aul) +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(sensor) +BuildRequires: pkgconfig(devman) +BuildRequires: pkgconfig(devman_plugin) +BuildRequires: pkgconfig(heynoti) + +%description +Description: Power manager + + +%prep +%setup -q + +%build +cp %{SOURCE1001} . +%ifnarch %arm +%if 0%{?simulator} +#for emulator +CFLAGS+=" -DTIZEN_EMUL" +%else +#for real device +CFLAGS+=" -DX86" +%endif +export CFLAGS +%endif +cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} + +make %{?jobs:-j%jobs} + +%install +rm -rf %{buildroot} +%make_install + +mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants +install -m 0644 %{SOURCE1} %{buildroot}%{_libdir}/systemd/system/power-manager.service +ln -s ../power-manager.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/power-manager.service + +mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d/ +mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d/ +ln -s %{_sysconfdir}/init.d/pmctrl %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S35power-manager +ln -s %{_sysconfdir}/init.d/pmctrl %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S00power-manager + +%post +vconftool set -t int memory/pm/state 0 -i +vconftool set -t int memory/pm/battery_timetofull -1 -i +vconftool set -t int memory/pm/battery_timetoempty -1 -i +vconftool set -t int memory/pm/custom_brightness_status 0 -i -g 5000 +vconftool set -t bool memory/pm/brt_changed_lpm 0 -i + +heynotitool set system_wakeup +heynotitool set pm_event + +mkdir -p /etc/udev/rules.d +if ! [ -L /etc/udev/rules.d/91-power-manager.rules ]; then + ln -s %{_datadir}/power-manager/udev-rules/91-power-manager.rules /etc/udev/rules.d/91-power-manager.rules +fi + +%files +%manifest power-manager.manifest +%{_sysconfdir}/rc.d/init.d/pmctrl +%{_sysconfdir}/rc.d/rc3.d/S35power-manager +%{_sysconfdir}/rc.d/rc5.d/S00power-manager +%{_bindir}/pm_event +%{_bindir}/pmctrl +%{_bindir}/power_manager +%{_libdir}/systemd/system/power-manager.service +%{_libdir}/systemd/system/multi-user.target.wants/power-manager.service +%{_datadir}/power-manager/udev-rules/91-power-manager.rules |