update dde-api package
This commit is contained in:
parent
4b5a210b01
commit
2aaa5b1bff
BIN
dde-api_5.1.11.1-server-industry.orig.tar.xz → dde-api-5.4.30.tar.gz
Executable file → Normal file
BIN
dde-api_5.1.11.1-server-industry.orig.tar.xz → dde-api-5.4.30.tar.gz
Executable file → Normal file
Binary file not shown.
75
dde-api.spec
Executable file → Normal file
75
dde-api.spec
Executable file → Normal file
@ -1,4 +1,7 @@
|
||||
# Run tests in check section
|
||||
# disable for bootstrapping
|
||||
%bcond_with check
|
||||
#%global _unpackaged_files_terminate_build 0
|
||||
%global with_debug 1
|
||||
|
||||
%if 0%{?with_debug}
|
||||
@ -6,8 +9,8 @@
|
||||
%endif
|
||||
|
||||
%global sname deepin-api
|
||||
%global release_name server-industry
|
||||
|
||||
# out of memory on armv7hl
|
||||
%ifarch %{arm}
|
||||
%global _smp_mflags -j1
|
||||
%endif
|
||||
@ -15,22 +18,22 @@
|
||||
%global goipath pkg.deepin.io/dde/api
|
||||
%global forgeurl https://github.com/linuxdeepin/dde-api
|
||||
%global tag %{version}
|
||||
%gometa
|
||||
|
||||
Name: dde-api
|
||||
Version: 5.1.11.1
|
||||
Release: 6
|
||||
Version: 5.4.30
|
||||
Release: 2
|
||||
Summary: Go-lang bingding for dde-daemon
|
||||
License: GPLv3+
|
||||
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
|
||||
Patch1: deepin-api_makefile.patch
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: libcanberra-devel
|
||||
BuildRequires: deepin-gettext-tools
|
||||
BuildRequires: git
|
||||
BuildRequires: libcanberra-devel
|
||||
BuildRequires: deepin-gettext-tools
|
||||
BuildRequires: librsvg2-devel
|
||||
BuildRequires: sqlite-devel
|
||||
BuildRequires: compiler(go-compiler)
|
||||
BuildRequires: golang-github-linuxdeepin-go-x11-client-devel
|
||||
BuildRequires: gdk-pixbuf2-xlib-devel
|
||||
BuildRequires: kf5-kwayland-devel
|
||||
BuildRequires: poppler-glib
|
||||
@ -38,6 +41,13 @@ BuildRequires: poppler-glib-devel
|
||||
BuildRequires: alsa-lib-devel
|
||||
BuildRequires: alsa-lib
|
||||
BuildRequires: pulseaudio-libs-devel
|
||||
|
||||
BuildRequires: gocode
|
||||
|
||||
BuildRequires: go-gir-generator
|
||||
BuildRequires: golang-github-linuxdeepin-go-dbus-factory-devel
|
||||
BuildRequires: go-lib-devel
|
||||
BuildRequires: libgudev-devel
|
||||
%{?systemd_requires}
|
||||
Requires: deepin-desktop-base
|
||||
Requires: rfkill
|
||||
@ -46,8 +56,19 @@ Requires(pre): shadow-utils
|
||||
%description
|
||||
%{summary}.
|
||||
|
||||
%package -n %{name}-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}-devel
|
||||
%{summary}.
|
||||
|
||||
This package contains library source intended for
|
||||
building other packages which use import path with
|
||||
%{goipath} prefix.
|
||||
|
||||
%prep
|
||||
%forgeautosetup -p1 -n %{name}-%{version}-%{release_name}
|
||||
%forgeautosetup -p1 -n %{name}-%{version}
|
||||
|
||||
sed -i 's|/usr/lib|%{_libexecdir}|' misc/*services/*.service \
|
||||
misc/systemd/system/deepin-shutdown-sound.service \
|
||||
@ -59,26 +80,24 @@ sed -i 's|PREFIX}${libdir|LIBDIR|; s|libdir|LIBDIR|' \
|
||||
Makefile adjust-grub-theme/main.go
|
||||
|
||||
%build
|
||||
%gobuildroot
|
||||
for cmd in $(make binaries); do
|
||||
GOPATH=%{_builddir}/%{name}-%{version}-%{release_name}/vendor
|
||||
go build -mod=vendor -o _bin/$cmd %{goipath}/$cmd
|
||||
done
|
||||
%ifarch loongarch64
|
||||
export CGO_ENABLED=1
|
||||
export GOOS="linux"
|
||||
%endif
|
||||
|
||||
export GOPATH=/usr/share/gocode/:$GOPATH
|
||||
%make_build
|
||||
|
||||
%install
|
||||
rm -rf $(make binaries)
|
||||
gofiles=$(find $(make libraries) %{?gofindfilter} -print)
|
||||
%goinstall $gofiles
|
||||
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
|
||||
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}
|
||||
%check
|
||||
%gochecks
|
||||
%endif
|
||||
|
||||
%pre
|
||||
getent group deepin-sound-player >/dev/null || groupadd -r deepin-sound-player
|
||||
getent passwd deepin-sound-player >/dev/null || \
|
||||
@ -114,18 +133,28 @@ exit 0
|
||||
%{_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
|
||||
%exclude /usr/share/gocode/src
|
||||
|
||||
%files -n %{name}-devel -f devel.file-list
|
||||
%{_datadir}/gocode/src/%{goipath}/*
|
||||
|
||||
%changelog
|
||||
* Tue Nov 21 2023 hanshuang <hanshuang@uniontech.com> - 5.4.30-2
|
||||
- update package
|
||||
|
||||
* Thu Sep 3 2020 weidong <weidong@uniontech.com> - 5.1.11.1-6
|
||||
- fix source url in spec
|
||||
|
||||
* Wed Sep 2 2020 chenbo pan <panchenbo@uniontech.com> - 5.1.11.1-5
|
||||
- remove dde-api-devel
|
||||
|
||||
* Wed Sep 2 2020 chenbo pan <panchenbo@uniontech.com> - 5.1.11.1-4
|
||||
- remove install golang devel
|
||||
|
||||
* Tue Aug 18 2020 chenbo pan <panchenbo@uniontech.com> - 5.1.11.1-3
|
||||
- remove golang devel
|
||||
|
||||
* Thu Jul 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 5.1.11.1-2
|
||||
- fix spec
|
||||
|
||||
* Thu Jul 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 5.1.11.1-1
|
||||
- Package init
|
||||
|
||||
@ -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