X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fstart-menu.git;a=blobdiff_plain;f=start-menu.spec;fp=start-menu.spec;h=76a2e04a36fac6b97ff8d21780590e2bd6a0967b;hp=0000000000000000000000000000000000000000;hb=b375099e93d04ad442dc74dedba26facbaf48c62;hpb=781906b4537f9a248c7f7f4ad4fdf7abc4f629db diff --git a/start-menu.spec b/start-menu.spec new file mode 100644 index 0000000..76a2e04 --- /dev/null +++ b/start-menu.spec @@ -0,0 +1,67 @@ +# Copyright 2019 Nokia + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +Name: start-menu +Version: %{_version} +Release: 1%{?dist} +Summary: Contains code for start menu. +License: %{_platform_licence} +Source0: %{name}-%{version}.tar.gz +Vendor: %{_platform_vendor} +BuildArch: noarch + +Requires: dialog +BuildRequires: rsync + +%description +This RPM contains code and support files for installing start menu + +%prep +%autosetup + +%build + +%install +mkdir -p %{buildroot}/opt/start-menu/ +mkdir -p %{buildroot}/etc/userconfig/ +mkdir -p %{buildroot}/usr/lib/systemd/system/ + +rsync -av src/* %{buildroot}/opt/start-menu +rsync -av services/start-menu.service %{buildroot}/usr/lib/systemd/system/start-menu.service + +find + +%files +%defattr(0755,root,root,0755) +/opt/start-menu* +/etc/userconfig +%attr(0644, root, root) /usr/lib/systemd/system/start-menu.service + +%pre + +%post +# Only enable the service, if it is a new installation or it will break the upgrade +if [ $1 -eq 1 ] +then + systemctl enable start-menu.service +fi + +%preun + +%postun +systemctl disable start-menu.service + +%clean +rm -rf %{buildroot} +