summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore9
-rw-r--r--Makefile4
-rw-r--r--libcgif.spec98
3 files changed, 111 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..01f0400
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+clog
+package-*.xml
+*.tgz
+*.tar.bz2
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..91b0fd5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../common/Makefile
+
diff --git a/libcgif.spec b/libcgif.spec
new file mode 100644
index 0000000..13401c4
--- /dev/null
+++ b/libcgif.spec
@@ -0,0 +1,98 @@
+# remirepo/fedora spec file for libcgif
+#
+# Copyright (c) 2021 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/4.0/
+#
+# Please, preserve the changelog entries
+#
+
+%global gh_commit e698ff1d03c3ddea4f67d5ec8b2cb23faf785680
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+#global gh_date 20211001
+%global gh_owner dloebl
+%global gh_project cgif
+%global libname libcgif
+%global soname 0
+
+Name: %{libname}
+Summary: A fast and lightweight GIF encoder
+Version: 0.0.1
+Release: 1%{?dist}
+License: MIT
+
+URL: https://github.com/%{gh_owner}/%{gh_project}
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
+
+BuildRequires: gcc
+BuildRequires: meson
+
+
+%description
+A fast and lightweight GIF encoder that can create GIF animations and images.
+
+Summary of the main features:
+
+- user-defined global or local color-palette with up to 256 colors
+ (limit of the GIF format)
+- size-optimizations for GIF animations:
+ - option to set a pixel to transparent if it has identical color in the
+ previous frame (transparency optimization)
+ - do encoding just for the rectangular area that differs from the previous
+ frame (width/height optimization)
+- fast: a GIF with 256 colors and 1024x1024 pixels can be created in below
+ 50 ms even on a minimalistic system
+- MIT license (permissive)
+- different options for GIF animations: static image, N repetitions, infinite
+ repetitions
+- additional source-code for verifying the encoder after making changes
+- user-defined delay time from one frame to the next (can be set independently
+ for each frame)
+- source-code conforms to the C99 standard
+
+
+%package devel
+Summary: Header files and development libraries for %{libname}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+This package contains the header files and development libraries
+for %{libname}.
+
+
+%prep
+%setup -q -n %{gh_project}-%{gh_commit}
+
+
+%build
+%meson
+%meson_build
+
+
+%install
+%meson_install
+
+# https://github.com/dloebl/cgif/issues/24
+grep ^Version %{buildroot}%{_libdir}/pkgconfig/%{gh_project}.pc
+sed -e 's/undefined/%{version}/' -i %{buildroot}%{_libdir}/pkgconfig/%{gh_project}.pc
+
+
+%check
+%meson_test
+
+
+%files
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%{_libdir}/%{libname}.so.%{soname}*
+
+%files devel
+%doc README.md
+%{_libdir}/pkgconfig/%{gh_project}.pc
+%{_libdir}/%{libname}.so
+%{_includedir}/%{gh_project}.h
+
+
+%changelog
+* Mon Nov 8 2021 Remi Collet <remi@remirepo.net> - 0.0.1-1
+- initial package