Update dde-api
This commit is contained in:
parent
93f0761c39
commit
b211d22ea7
BIN
dde-api-5.2.0.tar.gz
Normal file
BIN
dde-api-5.2.0.tar.gz
Normal file
Binary file not shown.
192
dde-api.spec
192
dde-api.spec
@ -1,123 +1,119 @@
|
|||||||
%bcond_with check
|
%bcond_with check
|
||||||
%global with_debug 1
|
%global goipath pkg.deepin.io/lib
|
||||||
|
|
||||||
%if 0%{?with_debug}
|
|
||||||
%global debug_package %{nil}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global sname deepin-api
|
|
||||||
%global release_name server-industry
|
|
||||||
|
|
||||||
%ifarch %{arm}
|
|
||||||
%global _smp_mflags -j1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global goipath pkg.deepin.io/dde/api
|
|
||||||
%global forgeurl https://github.com/linuxdeepin/dde-api
|
|
||||||
%global tag %{version}
|
|
||||||
|
|
||||||
Name: dde-api
|
Name: dde-api
|
||||||
Version: 5.1.11.1
|
Version: 5.2.0
|
||||||
Release: 8
|
Release: 1
|
||||||
Summary: Go-lang bingding for dde-daemon
|
Summary: dde-api
|
||||||
License: GPLv2
|
License: GPLv3
|
||||||
URL: https://shuttle.corp.deepin.com/cache/tasks/19177/unstable-amd64/
|
URL: https://shuttle.corp.deepin.com/cache/tasks/19177/unstable-amd64/
|
||||||
Source0: https://shuttle.corp.deepin.com/cache/tasks/19177/unstable-amd64/%{name}_%{version}-%{release_name}.orig.tar.xz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Patch1: deepin-api_makefile.patch
|
|
||||||
|
|
||||||
BuildRequires: libcanberra-devel
|
|
||||||
BuildRequires: deepin-gettext-tools
|
|
||||||
BuildRequires: librsvg2-devel
|
|
||||||
BuildRequires: sqlite-devel
|
|
||||||
BuildRequires: golang
|
BuildRequires: golang
|
||||||
BuildRequires: gdk-pixbuf2-xlib-devel
|
BuildRequires: pkgconfig(alsa)
|
||||||
BuildRequires: kf5-kwayland-devel
|
BuildRequires: pkgconfig(cairo-ft)
|
||||||
BuildRequires: poppler-glib
|
BuildRequires: pkgconfig(gio-2.0)
|
||||||
BuildRequires: poppler-glib-devel
|
BuildRequires: pkgconfig(gtk+-3.0)
|
||||||
BuildRequires: alsa-lib-devel
|
BuildRequires: pkgconfig(gdk-pixbuf-xlib-2.0)
|
||||||
BuildRequires: alsa-lib
|
BuildRequires: pkgconfig(gudev-1.0)
|
||||||
BuildRequires: pulseaudio-libs-devel
|
BuildRequires: pkgconfig(libcanberra)
|
||||||
%{?systemd_requires}
|
BuildRequires: pkgconfig(libpulse-simple)
|
||||||
Requires: deepin-desktop-base
|
BuildRequires: pkgconfig(librsvg-2.0)
|
||||||
Requires: rfkill
|
BuildRequires: pkgconfig(poppler-glib)
|
||||||
Requires(pre): shadow-utils
|
BuildRequires: pkgconfig(polkit-qt5-1)
|
||||||
|
BuildRequires: pkgconfig(systemd)
|
||||||
|
BuildRequires: pkgconfig(xfixes)
|
||||||
|
BuildRequires: pkgconfig(xcursor)
|
||||||
|
BuildRequires: pkgconfig(x11)
|
||||||
|
BuildRequires: pkgconfig(xi)
|
||||||
|
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
||||||
|
BuildRequires: pkgconfig(gudev-1.0)
|
||||||
|
BuildRequires: pkgconfig(sqlite3)
|
||||||
|
BuildRequires: deepin-gettext-tools
|
||||||
|
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%{summary}.
|
dde-api
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%forgeautosetup -p1 -n %{name}-%{version}-%{release_name}
|
%autosetup
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
sed -i 's|PREFIX}${libdir|LIBDIR|; s|libdir|LIBDIR|' \
|
|
||||||
Makefile adjust-grub-theme/main.go
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
for cmd in $(make binaries); do
|
make -C ./gir generator
|
||||||
GOPATH=%{_builddir}/%{name}-%{version}-%{release_name}/vendor
|
make -C ./gir
|
||||||
go build -mod=vendor -o _bin/$cmd %{goipath}/$cmd
|
cp -r ./gir/out/src/pkg.deepin.io/gir/ ./pkg.deepin.io
|
||||||
done
|
|
||||||
%make_build
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $(make binaries)
|
install -d -p %{buildroot}/%{gopath}/src/
|
||||||
gofiles=$(find $(make libraries) %{?gofindfilter} -print)
|
for file in $(find . -iname "*.go" -o -iname "*.c" -o -iname "*.h" -o -iname "*.s") ; do
|
||||||
for file in $gofiles ; do
|
install -d -p %{buildroot}/%{gopath}/src/$(dirname $file)
|
||||||
install -d -p %{buildroot}/%{gopath}/src/%{goipath}/$(dirname $file)
|
cp -pav $file %{buildroot}/%{gopath}/src/$file
|
||||||
cp -pav $file %{buildroot}/%{gopath}/src/%{goipath}/$file
|
#echo "%{gopath}/src/$file" >> devel.file-list
|
||||||
done
|
done
|
||||||
%make_install SYSTEMD_SERVICE_DIR="%{_unitdir}" LIBDIR="%{_libexecdir}"
|
|
||||||
# HOME directory for user deepin-sound-player
|
|
||||||
mkdir -p %{buildroot}%{_sharedstatedir}/deepin-sound-player
|
|
||||||
|
|
||||||
%if %{with check}
|
make -C ./pkg.deepin.io/dde/api/ GOPATH=%{buildroot}/%{gopath}
|
||||||
%check
|
|
||||||
%gochecks
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%pre
|
install -d -p %{buildroot}/usr/lib/deepin-api
|
||||||
getent group deepin-sound-player >/dev/null || groupadd -r deepin-sound-player
|
for file in $(ls ./pkg.deepin.io/dde/api/out/bin) ; do
|
||||||
getent passwd deepin-sound-player >/dev/null || \
|
cp -pav ./pkg.deepin.io/dde/api/out/bin/$file %{buildroot}/usr/lib/deepin-api/$file
|
||||||
useradd -r -g deepin-sound-player -d %{_sharedstatedir}/deepin-sound-player\
|
echo "/usr/lib/deepin-api/$file" >> devel.file-list
|
||||||
-s /sbin/nologin \
|
done
|
||||||
-c "User of com.deepin.api.SoundThemePlayer.service" deepin-sound-player
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
%post
|
install -d -p %{buildroot}/usr/share/dbus-1/system.d/
|
||||||
%systemd_post deepin-shutdown-sound.service
|
for file in $(find ./pkg.deepin.io/dde/api/misc -iname "*.conf") ; do
|
||||||
|
cp -pav $file %{buildroot}/usr/share/dbus-1/system.d/$(basename $file)
|
||||||
|
echo "/usr/share/dbus-1/system.d/$(basename $file)" >> devel.file-list
|
||||||
|
done
|
||||||
|
|
||||||
%preun
|
install -d -p %{buildroot}/usr/share/dbus-1/services/
|
||||||
%systemd_preun deepin-shutdown-sound.service
|
for file in $(find ./pkg.deepin.io/dde/api/misc/services -iname "*.service") ; do
|
||||||
|
cp -pav $file %{buildroot}/usr/share/dbus-1/services/$(basename $file)
|
||||||
|
echo "/usr/share/dbus-1/services/$(basename $file)" >> devel.file-list
|
||||||
|
done
|
||||||
|
|
||||||
%postun
|
install -d -p %{buildroot}/usr/share/dbus-1/system-services/
|
||||||
%systemd_postun_with_restart deepin-shutdown-sound.service
|
for file in $(find ./pkg.deepin.io/dde/api/misc/system-services -iname "*.service") ; do
|
||||||
|
cp -pav $file %{buildroot}/usr/share/dbus-1/system-services/$(basename $file)
|
||||||
|
echo "/usr/share/dbus-1/system-services/$(basename $file)" >> devel.file-list
|
||||||
|
done
|
||||||
|
|
||||||
%files
|
install -d -p %{buildroot}/usr/share/polkit-1/actions
|
||||||
%doc README.md
|
for file in $(find ./pkg.deepin.io/dde/api/misc/polkit-action -iname "*.policy") ; do
|
||||||
%license LICENSE
|
cp -pav $file %{buildroot}/usr/share/polkit-1/actions/$(basename $file)
|
||||||
%{_bindir}/dde-open
|
echo "/usr/share/polkit-1/actions/$(basename $file)" >> devel.file-list
|
||||||
%{_libexecdir}/%{sname}/
|
done
|
||||||
%{_unitdir}/*.service
|
|
||||||
%{_datadir}/dbus-1/services/*.service
|
install -d -p %{buildroot}/var/lib/polkit-1/localauthority/10-vendor.d
|
||||||
%{_datadir}/dbus-1/system-services/*.service
|
for file in $(find ./pkg.deepin.io/dde/api/misc/polkit-localauthority -iname "*.pkla") ; do
|
||||||
%{_datadir}/dbus-1/system.d/*.conf
|
cp -pav $file %{buildroot}/var/lib/polkit-1/localauthority/10-vendor.d/$(basename $file)
|
||||||
%{_datadir}/icons/hicolor/*/actions/*
|
echo "/var/lib/polkit-1/localauthority/10-vendor.d/$(basename $file)" >> devel.file-list
|
||||||
%{_datadir}/dde-api/data/huangli.db
|
done
|
||||||
%{_datadir}/dde-api/data/huangli.version
|
|
||||||
%{_datadir}/dde-api/data/pkg_depends
|
install -d -p %{buildroot}/usr/share/dde-api
|
||||||
%{_datadir}/dde-api/data/grub-themes/
|
for file in $(find ./pkg.deepin.io/dde/api/misc/data) ; do
|
||||||
%{_datadir}/polkit-1/actions/com.deepin.api.locale-helper.policy
|
cp -pav $file %{buildroot}/usr/share/dde-api/$(basename $file)
|
||||||
%{_datadir}/polkit-1/actions/com.deepin.api.device.unblock-bluetooth-devices.policy
|
echo "/usr/share/dde-api/$(basename $file)" >> devel.file-list
|
||||||
%{_var}/lib/polkit-1/localauthority/10-vendor.d/com.deepin.api.device.pkla
|
done
|
||||||
%attr(-, deepin-sound-player, deepin-sound-player) %{_sharedstatedir}/deepin-sound-player
|
|
||||||
%exclude %{gopath}/src
|
install -d -p %{buildroot}/lib/systemd/system/
|
||||||
|
for file in $(find ./pkg.deepin.io/dde/api/misc/systemd/system/ -iname "*.service") ; do
|
||||||
|
cp -pav $file %{buildroot}/lib/systemd/system/$(basename $file)
|
||||||
|
echo "/lib/systemd/system/$(basename $file)" >> devel.file-list
|
||||||
|
done
|
||||||
|
|
||||||
|
install -d -p %{buildroot}/usr/share/icons/hicolor
|
||||||
|
for file in $(find ./pkg.deepin.io/dde/api/misc/icons/) ; do
|
||||||
|
cp -pav $file %{buildroot}/usr/share/icons/hicolor/$(basename $file)
|
||||||
|
echo "/usr/share/icons/hicolor/$(basename $file)" >> devel.file-list
|
||||||
|
done
|
||||||
|
rm -rf %{buildroot}/%{gopath}
|
||||||
|
|
||||||
|
%files -f devel.file-list
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 26 2021 weidong <weidong@uniontech.com> - 5.2.0-1
|
||||||
|
- Update dde-api.
|
||||||
|
|
||||||
* Thu Mar 4 2021 weidong <weidong@uniontech.com> - 5.1.11.1-8
|
* Thu Mar 4 2021 weidong <weidong@uniontech.com> - 5.1.11.1-8
|
||||||
- Update license.
|
- Update license.
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -1,58 +0,0 @@
|
|||||||
--- a/Makefile 2020-03-22 23:45:53.000000000 +0800
|
|
||||||
+++ b/Makefile 2020-04-27 20:28:02.391864563 +0800
|
|
||||||
@@ -2,8 +2,8 @@
|
|
||||||
GOBUILD_DIR = gobuild
|
|
||||||
GOPKG_PREFIX = pkg.deepin.io/dde/api
|
|
||||||
GOSITE_DIR = ${PREFIX}/share/gocode
|
|
||||||
-libdir = /lib
|
|
||||||
-SYSTEMD_LIB_DIR = ${libdir}
|
|
||||||
+LIBDIR = /lib
|
|
||||||
+SYSTEMD_LIB_DIR = ${LIBDIR}
|
|
||||||
SYSTEMD_SERVICE_DIR = ${SYSTEMD_LIB_DIR}/systemd/system/
|
|
||||||
GOBUILD = env GOPATH="${CURDIR}/${GOBUILD_DIR}:${GOPATH}" go build -mod=vendor
|
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|
||||||
image-blur \
|
|
||||||
image-blur-helper
|
|
||||||
|
|
||||||
-all: build-binary build-dev ts-to-policy
|
|
||||||
+all: ts-to-policy
|
|
||||||
|
|
||||||
prepare:
|
|
||||||
@if [ ! -d ${GOBUILD_DIR}/src/${GOPKG_PREFIX} ]; then \
|
|
||||||
@@ -66,12 +66,12 @@
|
|
||||||
build-binary: prepare $(addprefix out/bin/, ${BINARIES})
|
|
||||||
|
|
||||||
install-binary:
|
|
||||||
- mkdir -pv ${DESTDIR}${PREFIX}${libdir}/deepin-api
|
|
||||||
- cp out/bin/* ${DESTDIR}${PREFIX}${libdir}/deepin-api/
|
|
||||||
+ mkdir -pv ${DESTDIR}${LIBDIR}/deepin-api
|
|
||||||
+ cp _bin/* ${DESTDIR}${LIBDIR}/deepin-api/
|
|
||||||
|
|
||||||
mkdir -pv ${DESTDIR}${PREFIX}/bin
|
|
||||||
- cp out/bin/dde-open ${DESTDIR}${PREFIX}/bin
|
|
||||||
- rm ${DESTDIR}${PREFIX}${libdir}/deepin-api/dde-open
|
|
||||||
+ cp _bin/dde-open ${DESTDIR}${PREFIX}/bin
|
|
||||||
+ rm ${DESTDIR}${LIBDIR}/deepin-api/dde-open
|
|
||||||
|
|
||||||
mkdir -pv ${DESTDIR}${PREFIX}/share/dbus-1/system.d
|
|
||||||
cp misc/conf/*.conf ${DESTDIR}${PREFIX}/share/dbus-1/system.d/
|
|
||||||
@@ -106,7 +106,8 @@
|
|
||||||
|
|
||||||
install-dev: ${addprefix install/lib/, ${LIBRARIES}}
|
|
||||||
|
|
||||||
-install: install-binary install-dev
|
|
||||||
+install: install-binary
|
|
||||||
+
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf out/bin gobuild out
|
|
||||||
@@ -118,3 +119,8 @@
|
|
||||||
|
|
||||||
test: prepare
|
|
||||||
env GOPATH="${CURDIR}/${GOBUILD_DIR}:${GOPATH}" go test -v ./...
|
|
||||||
+binaries:
|
|
||||||
+ @echo ${BINARIES}
|
|
||||||
+
|
|
||||||
+libraries:
|
|
||||||
+ @echo ${LIBRARIES}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user