dde-api/dde-api.spec

183 lines
5.4 KiB
RPMSpec
Raw Normal View History

# Run tests in check section
# disable for bootstrapping
2020-07-13 18:39:44 +08:00
%bcond_with check
#%global _unpackaged_files_terminate_build 0
2023-03-14 17:19:46 +08:00
%global with_debug 1
2020-07-13 18:39:44 +08:00
%if 0%{?with_debug}
%global debug_package %{nil}
%endif
2021-08-26 19:38:26 +08:00
%global sname deepin-api
2020-07-13 18:39:44 +08:00
# out of memory on armv7hl
%ifarch %{arm}
%global _smp_mflags -j1
%endif
2021-08-26 19:38:26 +08:00
%global goipath pkg.deepin.io/dde/api
%global forgeurl https://github.com/linuxdeepin/dde-api
%global tag %{version}
2020-07-13 18:39:44 +08:00
Name: dde-api
2023-04-04 13:49:01 +08:00
Version: 5.4.30
2023-05-31 09:39:41 +08:00
Release: 2
Summary: Go-lang bingding for dde-daemon
License: GPLv3+
URL: https://shuttle.corp.deepin.com/cache/tasks/19177/unstable-amd64/
2023-04-04 13:49:01 +08:00
Source0: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
2020-07-13 18:39:44 +08:00
#fix sound service bug
Patch0001: 0001-fix-https-gitee.com-src-openeuler-dde-api-issues-I6H.patch
2023-03-14 17:19:46 +08:00
Patch0002: 0002-feat-fix-strip.patch
BuildRequires: libcanberra-devel
BuildRequires: deepin-gettext-tools
BuildRequires: librsvg2-devel
BuildRequires: sqlite-devel
#BuildRequires: go-compiler
BuildRequires: golang golang-devel
BuildRequires: gdk-pixbuf-xlib
BuildRequires: kf5-kwayland-devel
BuildRequires: poppler-glib
BuildRequires: poppler-glib-devel
BuildRequires: alsa-lib-devel
BuildRequires: alsa-lib
BuildRequires: pulseaudio-libs-devel
BuildRequires: libgudev-devel
%{?systemd_requires}
Requires: deepin-desktop-base
Requires: rfkill
Requires(pre): shadow-utils
2020-07-13 18:39:44 +08:00
%description
%{summary}.
2020-07-13 18:39:44 +08:00
%package -n %{name}-devel
Summary: %{summary}
BuildArch: noarch
2021-08-26 19:38:26 +08:00
%description -n %{name}-devel
%{summary}.
2021-08-26 19:38:26 +08:00
This package contains library source intended for
building other packages which use import path with
%{goipath} prefix.
2021-08-26 19:38:26 +08:00
%prep
%forgeautosetup -p1 -n %{name}-%{version}
2021-08-26 19:38:26 +08:00
sed -i 's|/usr/lib|%{_libexecdir}|' misc/*services/*.service \
misc/systemd/system/deepin-shutdown-sound.service \
lunar-calendar/main.go \
theme_thumb/gtk/gtk.go \
thumbnails/gtk/gtk.go
2021-08-26 19:38:26 +08:00
sed -i 's|PREFIX}${libdir|LIBDIR|; s|libdir|LIBDIR|' \
Makefile adjust-grub-theme/main.go
tar -xf %{SOURCE1}
2021-08-26 19:38:26 +08:00
%build
go env -w GO111MODULE=auto
export GOPATH=%{_builddir}/%{name}-%{version}/vendor:$GOPATH
%make_build
2021-08-26 19:38:26 +08:00
%install
for file in $(find . -iname "*.go" -o -iname "*.c" -o -iname "*.h" -o -iname "*.s"); do
install -d -p %{buildroot}/%{gopath}/src/%{goipath}/$(dirname $file)
cp -pav $file %{buildroot}/%{gopath}/src/%{goipath}/$file
echo "%{gopath}/src/%{goipath}/$file" >> devel.file-list
2021-08-26 19:38:26 +08:00
done
2023-04-04 13:49:01 +08:00
%make_install SYSTEMD_SERVICE_DIR="%{_unitdir}" LIBDIR="%{_libexecdir}"
# HOME directory for user deepin-sound-player
mkdir -p %{buildroot}%{_sharedstatedir}/deepin-sound-player
%pre
getent group deepin-sound-player >/dev/null || groupadd -r deepin-sound-player
getent passwd deepin-sound-player >/dev/null || \
useradd -r -g deepin-sound-player -d %{_sharedstatedir}/deepin-sound-player\
-s /sbin/nologin \
-c "User of com.deepin.api.SoundThemePlayer.service" deepin-sound-player
exit 0
%post
%systemd_post deepin-shutdown-sound.service
%preun
%systemd_preun deepin-shutdown-sound.service
%postun
%systemd_postun_with_restart deepin-shutdown-sound.service
%files
%doc README.md
%license LICENSE
%{_bindir}/dde-open
%{_libexecdir}/%{sname}/
%{_unitdir}/*.service
%{_datadir}/dbus-1/services/*.service
%{_datadir}/dbus-1/system-services/*.service
%{_datadir}/dbus-1/system.d/*.conf
%{_datadir}/icons/hicolor/*/actions/*
%{_datadir}/dde-api/data/huangli.db
%{_datadir}/dde-api/data/huangli.version
%{_datadir}/dde-api/data/pkg_depends
%{_datadir}/dde-api/data/grub-themes/
%{_datadir}/polkit-1/actions/com.deepin.api.locale-helper.policy
%{_datadir}/polkit-1/actions/com.deepin.api.device.unblock-bluetooth-devices.policy
%{_var}/lib/polkit-1/localauthority/10-vendor.d/com.deepin.api.device.pkla
%attr(-, deepin-sound-player, deepin-sound-player) %{_sharedstatedir}/deepin-sound-player
%files -n %{name}-devel -f devel.file-list
2023-04-04 13:49:01 +08:00
%{_datadir}/gocode/src/%{goipath}/*/testdata/
%{_datadir}/gocode/src/%{goipath}/themes/scanner/testdata/
2020-07-13 18:39:44 +08:00
%changelog
2023-05-31 09:39:41 +08:00
* Wed May 31 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 5.4.30-2
- update sys to 0.4.0 to support loong64
2023-04-04 13:49:01 +08:00
* Tue Apr 04 2023 liweiganga <liweiganga@uniontech.com> - 5.4.30-1
- update: update 5.4.30
* Tue Apr 04 2023 liweiganga <liweiganga@uniontech.com> - 5.4.6-5
- feat: fix pie
2023-03-14 17:19:46 +08:00
* Tue Mar 14 2023 liweiganga <liweiganga@uniontech.com> - 5.4.6-4
- feat: fix strip
* Fri Mar 10 2023 heyitao <heyitao@uniontech.com> - 5.4.6-3
- Fix sound service failed
* Wed Dec 21 2022 liweiganga <liweiganga@uniontech.com> - 5.4.6-2
- enable debuginfo for fix strip
* Mon Jul 18 2022 konglidong <konglidong@uniontech.com> - 5.4.6-1
- Update to 5.4.6
2022-01-29 17:41:51 +08:00
* Sat Jan 29 2022 liweiganga <liweiganga@uniontech.com> - 5.2.0-2
- fix build error.
2021-08-26 19:38:26 +08:00
* Thu Aug 26 2021 weidong <weidong@uniontech.com> - 5.2.0-1
- Update dde-api.
2021-03-04 14:53:20 +08:00
* Thu Mar 4 2021 weidong <weidong@uniontech.com> - 5.1.11.1-8
- Update license.
2021-02-18 11:38:55 +08:00
* Thu Feb 18 2021 panchenbo <panchenbo@uniontech.com> - 5.1.11.1-7
- fix build error
2020-09-03 15:09:05 +08:00
* Thu Sep 3 2020 weidong <weidong@uniontech.com> - 5.1.11.1-6
- fix source url in spec
2020-09-02 16:07:41 +08:00
* Wed Sep 2 2020 chenbo pan <panchenbo@uniontech.com> - 5.1.11.1-5
- remove dde-api-devel
2020-09-02 08:13:38 +08:00
* Wed Sep 2 2020 chenbo pan <panchenbo@uniontech.com> - 5.1.11.1-4
- remove install golang devel
2020-08-18 18:39:54 +08:00
* Tue Aug 18 2020 chenbo pan <panchenbo@uniontech.com> - 5.1.11.1-3
- remove golang devel
2020-07-30 15:16:55 +08:00
* Thu Jul 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 5.1.11.1-2
- fix spec
2020-07-30 14:38:41 +08:00
* Thu Jul 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 5.1.11.1-1
- Package init