package init
This commit is contained in:
parent
63ad65e2fa
commit
a3ccbb0a02
153
dde-api.spec
Executable file
153
dde-api.spec
Executable file
@ -0,0 +1,153 @@
|
||||
# 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}
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
%global sname deepin-api
|
||||
%global release_name server-industry
|
||||
|
||||
# out of memory on armv7hl
|
||||
%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}
|
||||
%gometa
|
||||
|
||||
Name: dde-api
|
||||
Version: 5.1.11.1
|
||||
Release: 1
|
||||
Summary: Go-lang bingding for dde-daemon
|
||||
License: GPLv3+
|
||||
URL: https://shuttle.corp.deepin.com/cache/tasks/19177/unstable-amd64/
|
||||
Source0: %{name}_%{version}-%{release_name}.orig.tar.xz
|
||||
Patch1: deepin-api_makefile.patch
|
||||
|
||||
BuildRequires: libcanberra-devel
|
||||
BuildRequires: go-lib-devel
|
||||
BuildRequires: deepin-gettext-tools
|
||||
BuildRequires: deepin-gir-generator
|
||||
BuildRequires: librsvg2-devel
|
||||
#BuildRequires: libsqlite3x-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: golang-github-linuxdeepin-go-dbus-factory-devel
|
||||
BuildRequires: golang-github-mattn-go-sqlite3-devel
|
||||
BuildRequires: golang-gopkg-alecthomas-kingpin-devel
|
||||
BuildRequires: golang-github-alecthomas-template-devel
|
||||
BuildRequires: golang-github-alecthomas-units-devel
|
||||
BuildRequires: poppler-glib
|
||||
BuildRequires: poppler-glib-devel
|
||||
BuildRequires: golang-github-cryptix-wav-devel
|
||||
BuildRequires: alsa-lib-devel
|
||||
BuildRequires: alsa-lib
|
||||
BuildRequires: pulseaudio-libs-devel
|
||||
BuildRequires: golang-github-disintegration-imaging-devel
|
||||
BuildRequires: golang-github-fogleman-gg-devel
|
||||
BuildRequires: golang-github-golang-freetype-devel
|
||||
BuildRequires: golang.org-x-image-devel
|
||||
BuildRequires: golang-golang-org-net-devel
|
||||
BuildRequires: golang-github-rickb777-date-devel
|
||||
%{?systemd_requires}
|
||||
Requires: deepin-desktop-base
|
||||
Requires: rfkill
|
||||
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}
|
||||
|
||||
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
|
||||
export GOPATH=/usr/share/gocode:$GOPATH
|
||||
%gobuildroot
|
||||
for cmd in $(make binaries); do
|
||||
%gobuild -o _bin/$cmd %{goipath}/$cmd
|
||||
done
|
||||
%make_build
|
||||
|
||||
%install
|
||||
rm -rf $(make binaries)
|
||||
gofiles=$(find $(make libraries) %{?gofindfilter} -print)
|
||||
%goinstall $gofiles
|
||||
%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 || \
|
||||
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
|
||||
|
||||
%changelog
|
||||
* Fri Jun 12 2020 uoser <uoser@uniontech.com> - 5.1.11.1
|
||||
- Update to 5.1.11.1
|
||||
BIN
dde-api_5.1.11.1-server-industry.orig.tar.xz
Executable file
BIN
dde-api_5.1.11.1-server-industry.orig.tar.xz
Executable file
Binary file not shown.
BIN
deepin-api-deps-from-golang-x-image-patch.tar.gz
Normal file
BIN
deepin-api-deps-from-golang-x-image-patch.tar.gz
Normal file
Binary file not shown.
58
deepin-api_makefile.patch
Normal file
58
deepin-api_makefile.patch
Normal file
@ -0,0 +1,58 @@
|
||||
--- 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
|
||||
|
||||
@@ -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