Skip to content

Instantly share code, notes, and snippets.

@K1ngfish3r
Created July 12, 2024 02:26
Show Gist options
  • Save K1ngfish3r/e659dd52f7ef5fb6ddba12563e6891bd to your computer and use it in GitHub Desktop.
Save K1ngfish3r/e659dd52f7ef5fb6ddba12563e6891bd to your computer and use it in GitHub Desktop.
From d9517a7d06126c029287bd705ca2431354927e39 Mon Sep 17 00:00:00 2001
From: K1ngfish3r <trulyihu@gmail.com>
Date: Fri, 12 Jul 2024 10:25:36 +0800
Subject: [PATCH snapshot] snapshot: Autospec creation for version 46.3
---
.gitignore | 19 +++++++
Makefile | 5 ++
build_pattern | 1 +
buildreq_add | 3 ++
buildreq_ban | 2 +
buildreq_cache | 6 +++
excludes | 2 +
meson_options.txt | 10 ++++
options.conf | 78 ++++++++++++++++++++++++++++
pkgconfig_add | 2 +
pkgconfig_ban | 2 +
release | 1 +
requires_add | 2 +
requires_ban | 2 +
snapshot.license | 1 +
snapshot.spec | 127 ++++++++++++++++++++++++++++++++++++++++++++++
testresults | 5 ++
upstream | 1 +
used_libs | 13 +++++
whatrequires | 1 +
20 files changed, 283 insertions(+)
create mode 100644 .gitignore
create mode 100644 Makefile
create mode 100644 build_pattern
create mode 100644 buildreq_add
create mode 100644 buildreq_ban
create mode 100644 buildreq_cache
create mode 100644 excludes
create mode 100644 meson_options.txt
create mode 100644 options.conf
create mode 100644 pkgconfig_add
create mode 100644 pkgconfig_ban
create mode 100644 release
create mode 100644 requires_add
create mode 100644 requires_ban
create mode 100644 snapshot.license
create mode 100644 snapshot.spec
create mode 100644 testresults
create mode 100644 upstream
create mode 100644 used_libs
create mode 100644 whatrequires
diff --git a/build_pattern b/build_pattern
new file mode 100644
index 0000000..9b604bb
--- /dev/null
+++ b/build_pattern
@@ -0,0 +1 @@
+meson
\ No newline at end of file
diff --git a/buildreq_add b/buildreq_add
new file mode 100644
index 0000000..a58557f
--- /dev/null
+++ b/buildreq_add
@@ -0,0 +1,3 @@
+rustc
\ No newline at end of file
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..1d04c96
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,10 @@
+option(
+ 'profile',
+ type: 'combo',
+ choices: [
+ 'default',
+ 'development'
+ ],
+ value: 'default',
+ description: 'The build profile for Snapshot. One of "default" or "development".'
+)
diff --git a/options.conf b/options.conf
new file mode 100644
index 0000000..2266580
--- /dev/null
+++ b/options.conf
@@ -0,0 +1,78 @@
+giturl = https://gitlab.gnome.org/GNOME/snapshot
+# allow windows executables (*.exe, *.dll) to be packaged
+allow_exe = false
+autoupdate = true
+# create vendor archive with cargo
+cargo_vendor = false
+# compile full (traditional) debug info
+full-debug-info = false
+# do not use the replacement pattern for file matching
+no_glob = false
+# package is only used by servers
+server = false
+# configure build for apx
+use_apx = false
+# use ninja build files
+use_ninja = false
+verify_required = false
diff --git a/snapshot.license b/snapshot.license
new file mode 100644
index 0000000..a83ef26
--- /dev/null
+++ b/snapshot.license
@@ -0,0 +1 @@
+GPL-3.0
\ No newline at end of file
diff --git a/snapshot.spec b/snapshot.spec
new file mode 100644
index 0000000..8f56423
--- /dev/null
+++ b/snapshot.spec
@@ -0,0 +1,127 @@
+#
+# This file is auto-generated. DO NOT EDIT
+# Generated by: autospec.py
+# Using build pattern: meson
+# autospec version: v16
+# autospec commit: b858a2a
+#
+Name : snapshot
+Source0 : https://download.gnome.org/sources/snapshot/46/snapshot-46.3.tar.xz
+License : GPL-3.0
+Requires: snapshot-bin = %{version}-%{release}
+Requires: snapshot-data = %{version}-%{release}
+Requires: snapshot-locales = %{version}-%{release}
+BuildRequires : buildreq-gnome
+BuildRequires : buildreq-meson
+BuildRequires : gstreamer-dev
+BuildRequires : pkgconfig(gstreamer-1.0)
+BuildRequires : pkgconfig(gstreamer-plugins-bad-1.0)
+BuildRequires : pkgconfig(gstreamer-video-1.0)
+BuildRequires : pkgconfig(libadwaita-1)
+BuildRequires : rustc
+# Suppress stripping binaries
+%define __strip /bin/true
+%define debug_package %{nil}
+
+%description
+<!-- <a href="https://flathub.org/apps/details/org.gnome.Snapshot"> -->
+<!-- <img src="https://flathub.org/assets/badges/flathub-badge-i-en.png" width="190px" /> -->
+<!-- </a> -->
+
+%package bin
+Requires: snapshot-data = %{version}-%{release}
+
+
+
+%package data
+
+
+
+%package locales
+
+
+
+%prep
+
+%build
+CLEAR_INTERMEDIATE_CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
+CLEAR_INTERMEDIATE_FCFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
+CLEAR_INTERMEDIATE_FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
+CLEAR_INTERMEDIATE_CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
+CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS"
+CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS"
+FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS"
+FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS"
+ASFLAGS="$CLEAR_INTERMEDIATE_ASFLAGS"
+LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS"
+export GOAMD64=v2
+meson --libdir=lib64 --prefix=/usr --buildtype=plain builddir
+ninja -v -C builddir
+
+%install
+CLEAR_INTERMEDIATE_CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
+CLEAR_INTERMEDIATE_FCFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
+CLEAR_INTERMEDIATE_FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
+CLEAR_INTERMEDIATE_CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
+CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS"
+CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS"
+FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS"
+FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS"
+ASFLAGS="$CLEAR_INTERMEDIATE_ASFLAGS"
+LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS"
+export GOAMD64=v2
+GOAMD64=v2
+DESTDIR=%{buildroot} ninja -C builddir install
+%find_lang snapshot
+
+%files
+%defattr(-,root,root,-)
+
+%files bin
+%defattr(-,root,root,-)
+/usr/bin/snapshot
+
+%files data
+%defattr(-,root,root,-)
+/usr/share/applications/org.gnome.Snapshot.desktop
+/usr/share/glib-2.0/schemas/org.gnome.Snapshot.gschema.xml
+/usr/share/icons/hicolor/scalable/apps/org.gnome.Snapshot.svg
+/usr/share/icons/hicolor/symbolic/apps/org.gnome.Snapshot-symbolic.svg
+/usr/share/metainfo/org.gnome.Snapshot.metainfo.xml
+/usr/share/snapshot/resources.gresource
+
+%files locales -f snapshot.lang
+%defattr(-,root,root,-)
+
diff --git a/used_libs b/used_libs
new file mode 100644
index 0000000..5e94df1
--- /dev/null
+++ b/used_libs
@@ -0,0 +1,13 @@
+libadwaita-1.so.0
+libc.so.6
+libgcc_s.so.1
+libgio-2.0.so.0
+libglib-2.0.so.0
+libgobject-2.0.so.0
+libgraphene-1.0.so.0
+libgstgl-1.0.so.0
+libgstpbutils-1.0.so.0
+libgstreamer-1.0.so.0
+libgstvideo-1.0.so.0
+libgtk-4.so.1
+libm.so.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment