forked from pool/caffeine
Compare commits
8 Commits
35b2c0966c
...
c095f8cda5
Author | SHA256 | Date | |
---|---|---|---|
c095f8cda5 | |||
|
82a81dc15f | ||
6089475618 | |||
64bc848923 | |||
|
52879348c5 | ||
|
53f7eed09d | ||
|
bde61cb813 | ||
|
cdebfadc79 |
54
caffeine-2.9.3.pom
Normal file
54
caffeine-2.9.3.pom
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<!-- This module was also published with a richer model, Gradle metadata, -->
|
||||
<!-- which should be used instead. Do not delete the following line which -->
|
||||
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
|
||||
<!-- that they should prefer consuming it instead. -->
|
||||
<!-- do_not_remove: published-with-gradle-metadata -->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>caffeine</artifactId>
|
||||
<version>2.9.3</version>
|
||||
<name>Caffeine cache</name>
|
||||
<description>A high performance caching library</description>
|
||||
<url>https://github.com/ben-manes/caffeine</url>
|
||||
<inceptionYear>2014</inceptionYear>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache License, Version 2.0</name>
|
||||
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>ben-manes</id>
|
||||
<name>Ben Manes</name>
|
||||
<email>ben.manes@gmail.com</email>
|
||||
<roles>
|
||||
<role>owner</role>
|
||||
<role>developer</role>
|
||||
</roles>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:https://github.com/ben-manes/caffeine.git</connection>
|
||||
<developerConnection>scm:git:ssh://git@github.com/ben-manes/caffeine.git</developerConnection>
|
||||
<url>https://github.com/ben-manes/caffeine</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.checkerframework</groupId>
|
||||
<artifactId>checker-qual</artifactId>
|
||||
<version>3.19.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.errorprone</groupId>
|
||||
<artifactId>error_prone_annotations</artifactId>
|
||||
<version>2.10.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
BIN
caffeine-2.9.3.tar.gz
(Stored with Git LFS)
Normal file
BIN
caffeine-2.9.3.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,19 +0,0 @@
|
||||
=== modified file 'caffeine/main.py'
|
||||
--- caffeine/main.py 2011-11-11 05:12:50 +0000
|
||||
+++ caffeine/main.py 2011-11-20 01:40:33 +0000
|
||||
@@ -323,9 +323,11 @@
|
||||
|
||||
def on_R_click(self, status_icon, mbutton, time, data=None):
|
||||
## popdown menu
|
||||
- self.menu.popup(None, None,
|
||||
- Gtk.status_icon_position_menu, 3, time, self.status_icon)
|
||||
-
|
||||
+ self.menu.show_all()
|
||||
+ def func(menu, user_data):
|
||||
+ return status_icon.position_menu(self.menu, status_icon)
|
||||
+ self.menu.popup(None, None, func, self.status_icon, 3, time)
|
||||
+
|
||||
#### Window callbacks
|
||||
def on_add_button_clicked(self, button, data=None):
|
||||
response = self.ProcAdd.run()
|
||||
|
@@ -1,20 +0,0 @@
|
||||
diff -Naur a/share/applications/caffeine.desktop b/share/applications/caffeine.desktop
|
||||
--- a/share/applications/caffeine.desktop 2011-11-11 13:35:24.000000000 -0600
|
||||
+++ b/share/applications/caffeine.desktop 2012-02-13 21:14:50.263589577 -0600
|
||||
@@ -6,5 +6,5 @@
|
||||
Exec=/usr/bin/caffeine
|
||||
Terminal=false
|
||||
Type=Application
|
||||
-Categories=Utility;
|
||||
+Categories=Utility;DesktopUtility;
|
||||
StartupNotify=false
|
||||
diff -Naur a/share/applications/caffeine-preferences.desktop b/share/applications/caffeine-preferences.desktop
|
||||
--- a/share/applications/caffeine-preferences.desktop 2011-11-11 13:35:24.000000000 -0600
|
||||
+++ b/share/applications/caffeine-preferences.desktop 2012-02-13 21:22:23.038077555 -0600
|
||||
@@ -6,5 +6,5 @@
|
||||
Exec=/usr/bin/caffeine -p
|
||||
Terminal=false
|
||||
Type=Application
|
||||
-Categories=Settings;DesktopSettings
|
||||
+Categories=Settings;DesktopSettings;
|
||||
StartupNotify=false
|
@@ -1,56 +0,0 @@
|
||||
diff -Naur a/caffeine/applicationinstance.py b/caffeine/applicationinstance.py
|
||||
--- a/caffeine/applicationinstance.py 2011-11-11 13:35:24.000000000 -0600
|
||||
+++ b/caffeine/applicationinstance.py 2012-02-13 21:28:20.643134426 -0600
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright © 2009 The Caffeine Developers
|
||||
diff -Naur a/caffeine/core.py b/caffeine/core.py
|
||||
--- a/caffeine/core.py 2011-11-11 13:35:24.000000000 -0600
|
||||
+++ b/caffeine/core.py 2012-02-13 21:28:20.671134823 -0600
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright © 2009 The Caffeine Developers
|
||||
diff -Naur a/caffeine/flash_detect.py b/caffeine/flash_detect.py
|
||||
--- a/caffeine/flash_detect.py 2011-11-11 13:35:24.000000000 -0600
|
||||
+++ b/caffeine/flash_detect.py 2012-02-13 21:28:20.651134539 -0600
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/env python
|
||||
|
||||
import kaa.metadata
|
||||
import commands
|
||||
diff -Naur a/caffeine/__init__.py b/caffeine/__init__.py
|
||||
--- a/caffeine/__init__.py 2011-11-11 13:35:24.000000000 -0600
|
||||
+++ b/caffeine/__init__.py 2012-02-13 21:28:20.679134937 -0600
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright © 2009 The Caffeine Developers
|
||||
diff -Naur a/caffeine/main.py b/caffeine/main.py
|
||||
--- a/caffeine/main.py 2011-11-11 13:35:24.000000000 -0600
|
||||
+++ b/caffeine/main.py 2012-02-13 21:28:20.627134199 -0600
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright © 2009 The Caffeine Developers
|
||||
diff -Naur a/caffeine/procmanager.py b/caffeine/procmanager.py
|
||||
--- a/caffeine/procmanager.py 2011-11-11 13:35:24.000000000 -0600
|
||||
+++ b/caffeine/procmanager.py 2012-02-13 21:28:20.635134312 -0600
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright © 2009 The Caffeine Developers
|
||||
diff -Naur a/caffeine/utils.py b/caffeine/utils.py
|
||||
--- a/caffeine/utils.py 2011-11-11 13:35:24.000000000 -0600
|
||||
+++ b/caffeine/utils.py 2012-02-13 21:28:20.659134653 -0600
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright © 2009 The Caffeine Developers
|
56
caffeine-gen.pom
Normal file
56
caffeine-gen.pom
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>aux</groupId>
|
||||
<artifactId>aux-gen</artifactId>
|
||||
<version>1</version>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>19.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup</groupId>
|
||||
<artifactId>javapoet</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<directory>gen</directory>
|
||||
<outputDirectory>gen/classes</outputDirectory>
|
||||
<sourceDirectory>src/javaPoet/java</sourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/javaPoet/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>10</source>
|
||||
<target>10</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.5.0</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@@ -1,39 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 22 19:22:44 UTC 2013 - dimstar@opensuse.org
|
||||
Thu May 1 12:48:08 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Add python-xdg Requires (bnc#819520).
|
||||
- Explicitely declare checker-qual in build requires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 27 06:20:23 UTC 2013 - coolo@suse.com
|
||||
|
||||
- update license to new format
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 14 03:53:36 UTC 2012 - malcolmlewis@opensuse.org
|
||||
|
||||
- Add caffeine-fix-desktop-categories.patch: Fix categories string
|
||||
and missing semi-colon (lp#931874).
|
||||
- Add caffeine-fix-non-executable-script.patch: Fix
|
||||
non-executable-script warnings (lp#931875).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 9 17:07:27 UTC 2012 - vuntz@opensuse.org
|
||||
|
||||
- Cleanup for inclusion in Factory.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 13 15:23:00 UTC 2011 - malcolmlewis@opensuse.org
|
||||
|
||||
- Add requires exclusion for AppIndicator3.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 12 19:59:25 UTC 2011 - malcolmlewis@opensuse.org
|
||||
|
||||
- Spec file clean up to remove rpmlint warnings.
|
||||
- Add requires python-xlib.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 11 19:21:23 UTC 2011 - malcolmlewis@opensuse.org
|
||||
|
||||
- Initial build.
|
||||
Fri Nov 15 12:29:39 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Initial packaging with version 2.9.3
|
||||
* last version of the 2.x series that are compatible with
|
||||
Java 8
|
||||
|
276
caffeine.spec
276
caffeine.spec
@@ -1,8 +1,7 @@
|
||||
#
|
||||
# spec file for package caffeine
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2011 Malcolm J Lewis <malcolmlewis@opensuse.org>
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -13,90 +12,229 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define __requires_exclude typelib\\(AppIndicator3\\)
|
||||
|
||||
Name: caffeine
|
||||
Version: 2.4.1+419
|
||||
Version: 2.9.3
|
||||
Release: 0
|
||||
Summary: Utility to inhibit screensaver and sleep modes
|
||||
License: GPL-3.0+ and LGPL-3.0+
|
||||
Group: System/GUI/GNOME
|
||||
Url: https://launchpad.net/caffeine
|
||||
Source0: http://launchpad.net/caffeine/2.4/2.4.1/+download/caffeine_2.4.1+419~oneiric1.tar.gz
|
||||
# PATCH-FIX-UPSTREAM caffeine-add-indicator-menu.patch lp#892663 malcolmlewis@opensuse.org -- Adds the menu via right-click on indicator
|
||||
Patch0: caffeine-add-indicator-menu.patch
|
||||
# PATCH-FIX-UPSTREAM caffeine-fix-desktop-categories.patch lp#931874 malcolmlewis@opensuse.org -- Fix categories string and missing semi-colon.
|
||||
Patch1: caffeine-fix-desktop-categories.patch
|
||||
# PATCH-FIX-UPSTREAM caffeine-fix-non-executable-script.patch lp#931875 malcolmlewis@opensuse.org -- Fix non-executable-script warnings.
|
||||
Patch2: caffeine-fix-non-executable-script.patch
|
||||
BuildRequires: fdupes
|
||||
# For %%glib2_gsettings_schema_* macros
|
||||
BuildRequires: glib2-devel
|
||||
# For typelib() Requires
|
||||
BuildRequires: gobject-introspection
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: update-desktop-files
|
||||
Requires: python-xdg
|
||||
Requires: python-xlib
|
||||
Recommends: %{name}-lang
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Summary: High performance, near optimal caching library based on Java 8
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/ben-manes/%{name}
|
||||
Source0: https://github.com/ben-manes/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: %{name}-gen.pom
|
||||
Source2: https://repo1.maven.org/maven2/com/github/ben-manes/%{name}/%{name}/%{version}/%{name}-%{version}.pom
|
||||
Source3: https://repo1.maven.org/maven2/com/github/ben-manes/%{name}/guava/%{version}/guava-%{version}.pom
|
||||
Source4: https://repo1.maven.org/maven2/com/github/ben-manes/%{name}/jcache/%{version}/jcache-%{version}.pom
|
||||
Patch0: no-formatter.patch
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: mvn(com.google.code.findbugs:jsr305)
|
||||
BuildRequires: mvn(com.google.errorprone:error_prone_annotations)
|
||||
BuildRequires: mvn(com.google.guava:guava)
|
||||
BuildRequires: mvn(com.squareup:javapoet)
|
||||
BuildRequires: mvn(com.typesafe:config)
|
||||
BuildRequires: mvn(javax.cache:cache-api)
|
||||
BuildRequires: mvn(javax.inject:javax.inject)
|
||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||
BuildRequires: mvn(org.checkerframework:checker-qual)
|
||||
BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin)
|
||||
BuildRequires: mvn(org.osgi:osgi.cmpn)
|
||||
BuildArch: noarch
|
||||
%glib2_gsettings_schema_requires
|
||||
%py_requires
|
||||
|
||||
%description
|
||||
Caffeine is a status bar application able to temporarily prevent the
|
||||
activation of both the screensaver and the "sleep" powersaving mode.
|
||||
A Cache is similar to ConcurrentMap, but not quite the same. The most
|
||||
fundamental difference is that a ConcurrentMap persists all elements that are
|
||||
added to it until they are explicitly removed. A Cache on the other hand is
|
||||
generally configured to evict entries automatically, in order to constrain its
|
||||
memory footprint. In some cases a LoadingCache or AsyncLoadingCache can be
|
||||
useful even if it doesn't evict entries, due to its automatic cache loading.
|
||||
|
||||
Caffeine provide flexible construction to create a cache with a combination
|
||||
of the following features:
|
||||
automatic loading of entries into the cache, optionally asynchronously
|
||||
size-based eviction when a maximum is exceeded based on frequency and recency
|
||||
time-based expiration of entries, measured since last access or last write
|
||||
asynchronously refresh when the first stale request for an entry occurs
|
||||
keys automatically wrapped in weak references
|
||||
values automatically wrapped in weak or soft references
|
||||
notification of evicted (or otherwise removed) entries
|
||||
writes propagated to an external resource
|
||||
accumulation of cache access statistics
|
||||
|
||||
%package guava
|
||||
Summary: Caffeine Guava extension
|
||||
|
||||
%description guava
|
||||
An adapter to expose a Caffeine cache through the Guava interfaces.
|
||||
|
||||
%package jcache
|
||||
Summary: Caffeine JSR-107 JCache extension
|
||||
|
||||
%description jcache
|
||||
An adapter to expose a Caffeine cache through the JCache interfaces.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
|
||||
%description javadoc
|
||||
This package contains the API documentation for %{name}.
|
||||
|
||||
%lang_package
|
||||
%prep
|
||||
%setup -q -n recipe-%{version}
|
||||
%patch0
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%setup -q
|
||||
%patch -P 0 -p1
|
||||
|
||||
find -name "*.jar" -print -delete
|
||||
|
||||
# This is a dummy POM added just to ease building in the RPM platforms
|
||||
cat > pom.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>%{name}-parent</artifactId>
|
||||
<version>%{version}</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Caffeine Parent</name>
|
||||
<modules>
|
||||
<module>%{name}</module>
|
||||
<!-- module>simulator</module -->
|
||||
<!-- module>examples/write-behind-rxjava</module -->
|
||||
</modules>
|
||||
</project>
|
||||
EOF
|
||||
|
||||
cp -p %{SOURCE1} %{name}/gen.pom
|
||||
%pom_add_dep org.checkerframework:checker-qual %{name}/gen.pom
|
||||
cp -p %{SOURCE2} %{name}/pom.xml
|
||||
cp -p %{SOURCE3} guava/pom.xml
|
||||
cp -p %{SOURCE4} jcache/pom.xml
|
||||
|
||||
(
|
||||
for p in guava \
|
||||
jcache; do
|
||||
%pom_xpath_inject "pom:project/pom:modules" "<module>${p}</module>"
|
||||
%pom_xpath_inject "pom:project" "
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>" ${p}
|
||||
%pom_xpath_inject "pom:project" "
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>" ${p}
|
||||
|
||||
%pom_xpath_set "pom:project/pom:name" "Caffeine ${p} extension" ${p}
|
||||
%pom_xpath_inject "pom:project" "<packaging>bundle</packaging>" ${p}
|
||||
%pom_add_plugin org.apache.felix:maven-bundle-plugin ${p} "
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Bundle-SymbolicName>\${project.groupId}.${p}</Bundle-SymbolicName>
|
||||
<Bundle-Name>\${project.groupId}.${p}</Bundle-Name>
|
||||
<Bundle-Version>\${project.version}</Bundle-Version>
|
||||
</instructions>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>bundle-manifest</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>manifest</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>"
|
||||
echo hello
|
||||
done
|
||||
)
|
||||
|
||||
%pom_xpath_inject "pom:project" "<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>" %{name}
|
||||
|
||||
%pom_xpath_inject "pom:project" "
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>" %{name}
|
||||
|
||||
%pom_xpath_inject "pom:project" "<packaging>bundle</packaging>" %{name}
|
||||
%pom_add_plugin org.apache.felix:maven-bundle-plugin %{name} "
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<excludeDependencies>true</excludeDependencies>
|
||||
<instructions>
|
||||
<Bundle-SymbolicName>com.github.ben-manes.caffeine</Bundle-SymbolicName>
|
||||
<Bundle-Name>com.github.ben-manes.caffeine</Bundle-Name>
|
||||
<Bundle-Version>\${project.version}</Bundle-Version>
|
||||
</instructions>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>bundle-manifest</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>manifest</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>"
|
||||
|
||||
%pom_change_dep org.osgi:org.osgi.service.component.annotations org.osgi:osgi.cmpn:8.0.0 jcache
|
||||
|
||||
%{mvn_package} :%{name}-parent __noinstall
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
(
|
||||
cd %{name}
|
||||
for class in com.github.benmanes.caffeine.cache.LocalCacheFactoryGenerator \
|
||||
com.github.benmanes.caffeine.cache.NodeFactoryGenerator; do
|
||||
xmvn -B --offline -f gen.pom compile exec:java -Dexec.mainClass=$class -Dexec.args=src/main/java
|
||||
done
|
||||
)
|
||||
|
||||
# tests are skipped due to missing dependencies
|
||||
%{mvn_build} -sf
|
||||
|
||||
%install
|
||||
python setup.py install -O1 --skip-build --prefix=%{_prefix} --root=%{buildroot}
|
||||
%suse_update_desktop_file %{name}
|
||||
%suse_update_desktop_file %{name}-preferences
|
||||
# we don't need ubuntu themes
|
||||
rm -r %{buildroot}%{_datadir}/icons/ubuntu*
|
||||
%find_lang %{name} %{?no_lang_C}
|
||||
%fdupes %{buildroot}
|
||||
%mvn_install
|
||||
|
||||
%post
|
||||
%glib2_gsettings_schema_post
|
||||
%desktop_database_post
|
||||
%icon_theme_cache_post
|
||||
%files -f .mfiles-%{name}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
|
||||
%postun
|
||||
%glib2_gsettings_schema_postun
|
||||
%desktop_database_postun
|
||||
%icon_theme_cache_postun
|
||||
%files guava -f .mfiles-guava
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING COPYING.LESSER ICONS.INFO README
|
||||
%{_bindir}/caffeine
|
||||
%{python_sitelib}/caffeine
|
||||
%{python_sitelib}/caffeine-2.4.1-py%{py_ver}.egg-info
|
||||
%{_datadir}/applications/caffeine-preferences.desktop
|
||||
%{_datadir}/applications/caffeine.desktop
|
||||
%{_datadir}/caffeine/
|
||||
%{_datadir}/glib-2.0/schemas/net.launchpad.caffeine.gschema.xml
|
||||
%{_datadir}/icons/hicolor/*/apps/caffeine.*
|
||||
%{_datadir}/icons/hicolor/*/status/caffeine-*.*
|
||||
%{_datadir}/pixmaps/caffeine.png
|
||||
%{_mandir}/man1/caffeine.1%{?ext_man}
|
||||
%files jcache -f .mfiles-jcache
|
||||
|
||||
%files lang -f %{name}.lang
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:da5ba901f5a3a98d9100898c2989258fe6d1e5f906f4cc851e4c99f406b15c4f
|
||||
size 158044
|
54
guava-2.9.3.pom
Normal file
54
guava-2.9.3.pom
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<!-- This module was also published with a richer model, Gradle metadata, -->
|
||||
<!-- which should be used instead. Do not delete the following line which -->
|
||||
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
|
||||
<!-- that they should prefer consuming it instead. -->
|
||||
<!-- do_not_remove: published-with-gradle-metadata -->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>2.9.3</version>
|
||||
<name>Caffeine cache</name>
|
||||
<description>A high performance caching library</description>
|
||||
<url>https://github.com/ben-manes/caffeine</url>
|
||||
<inceptionYear>2014</inceptionYear>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache License, Version 2.0</name>
|
||||
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>ben-manes</id>
|
||||
<name>Ben Manes</name>
|
||||
<email>ben.manes@gmail.com</email>
|
||||
<roles>
|
||||
<role>owner</role>
|
||||
<role>developer</role>
|
||||
</roles>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:https://github.com/ben-manes/caffeine.git</connection>
|
||||
<developerConnection>scm:git:ssh://git@github.com/ben-manes/caffeine.git</developerConnection>
|
||||
<url>https://github.com/ben-manes/caffeine</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>caffeine</artifactId>
|
||||
<version>2.9.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>31.0.1-jre</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
72
jcache-2.9.3.pom
Normal file
72
jcache-2.9.3.pom
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<!-- This module was also published with a richer model, Gradle metadata, -->
|
||||
<!-- which should be used instead. Do not delete the following line which -->
|
||||
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
|
||||
<!-- that they should prefer consuming it instead. -->
|
||||
<!-- do_not_remove: published-with-gradle-metadata -->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>jcache</artifactId>
|
||||
<version>2.9.3</version>
|
||||
<name>Caffeine cache</name>
|
||||
<description>A high performance caching library</description>
|
||||
<url>https://github.com/ben-manes/caffeine</url>
|
||||
<inceptionYear>2014</inceptionYear>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache License, Version 2.0</name>
|
||||
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>ben-manes</id>
|
||||
<name>Ben Manes</name>
|
||||
<email>ben.manes@gmail.com</email>
|
||||
<roles>
|
||||
<role>owner</role>
|
||||
<role>developer</role>
|
||||
</roles>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:https://github.com/ben-manes/caffeine.git</connection>
|
||||
<developerConnection>scm:git:ssh://git@github.com/ben-manes/caffeine.git</developerConnection>
|
||||
<url>https://github.com/ben-manes/caffeine</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>caffeine</artifactId>
|
||||
<version>2.9.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.cache</groupId>
|
||||
<artifactId>cache-api</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.typesafe</groupId>
|
||||
<artifactId>config</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.inject</groupId>
|
||||
<artifactId>javax.inject</artifactId>
|
||||
<version>1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.osgi</groupId>
|
||||
<artifactId>org.osgi.service.component.annotations</artifactId>
|
||||
<version>1.4.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
84
no-formatter.patch
Normal file
84
no-formatter.patch
Normal file
@@ -0,0 +1,84 @@
|
||||
--- caffeine-2.9.3/caffeine/src/javaPoet/java/com/github/benmanes/caffeine/cache/LocalCacheFactoryGenerator.java 2024-11-15 18:24:57.889200870 +0100
|
||||
+++ caffeine-2.9.3/caffeine/src/javaPoet/java/com/github/benmanes/caffeine/cache/LocalCacheFactoryGenerator.java 2024-11-15 18:26:14.613025566 +0100
|
||||
@@ -66,8 +66,6 @@
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.io.MoreFiles;
|
||||
import com.google.common.io.Resources;
|
||||
-import com.google.googlejavaformat.java.Formatter;
|
||||
-import com.google.googlejavaformat.java.FormatterException;
|
||||
import com.squareup.javapoet.ClassName;
|
||||
import com.squareup.javapoet.FieldSpec;
|
||||
import com.squareup.javapoet.JavaFile;
|
||||
@@ -113,7 +111,6 @@
|
||||
generateLocalCaches();
|
||||
addFactoryMethods();
|
||||
writeJavaFile();
|
||||
- reformat();
|
||||
}
|
||||
|
||||
private void addFactoryMethods() {
|
||||
@@ -147,22 +144,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- private void reformat() throws IOException {
|
||||
- try (Stream<Path> stream = Files.walk(directory)) {
|
||||
- List<Path> files = stream
|
||||
- .filter(path -> path.toString().endsWith(".java"))
|
||||
- .collect(toList());
|
||||
- Formatter formatter = new Formatter();
|
||||
- for (Path file : files) {
|
||||
- String source = MoreFiles.asCharSource(file, UTF_8).read();
|
||||
- String formatted = formatter.formatSourceAndFixImports(source);
|
||||
- MoreFiles.asCharSink(file, UTF_8).write(formatted);
|
||||
- }
|
||||
- } catch (FormatterException e) {
|
||||
- throw new RuntimeException(e);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
private void addConstants() {
|
||||
List<String> constants = ImmutableList.of("maximum", "windowMaximum", "mainProtectedMaximum",
|
||||
"weightedSize", "windowWeightedSize", "mainProtectedWeightedSize");
|
||||
--- caffeine-2.9.3/caffeine/src/javaPoet/java/com/github/benmanes/caffeine/cache/NodeFactoryGenerator.java 2024-11-15 18:24:57.889200870 +0100
|
||||
+++ caffeine-2.9.3/caffeine/src/javaPoet/java/com/github/benmanes/caffeine/cache/NodeFactoryGenerator.java 2024-11-15 18:25:56.372908753 +0100
|
||||
@@ -72,8 +72,6 @@
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.io.MoreFiles;
|
||||
import com.google.common.io.Resources;
|
||||
-import com.google.googlejavaformat.java.Formatter;
|
||||
-import com.google.googlejavaformat.java.FormatterException;
|
||||
import com.squareup.javapoet.ClassName;
|
||||
import com.squareup.javapoet.FieldSpec;
|
||||
import com.squareup.javapoet.JavaFile;
|
||||
@@ -130,7 +128,6 @@
|
||||
generatedNodes();
|
||||
addNewFactoryMethods();
|
||||
writeJavaFile();
|
||||
- reformat();
|
||||
}
|
||||
|
||||
private void writeJavaFile() throws IOException {
|
||||
@@ -150,22 +147,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- private void reformat() throws IOException {
|
||||
- try (Stream<Path> stream = Files.walk(directory)) {
|
||||
- List<Path> files = stream
|
||||
- .filter(path -> path.toString().endsWith(".java"))
|
||||
- .collect(toList());
|
||||
- Formatter formatter = new Formatter();
|
||||
- for (Path file : files) {
|
||||
- String source = MoreFiles.asCharSource(file, UTF_8).read();
|
||||
- String formatted = formatter.formatSourceAndFixImports(source);
|
||||
- MoreFiles.asCharSink(file, UTF_8).write(formatted);
|
||||
- }
|
||||
- } catch (FormatterException e) {
|
||||
- throw new RuntimeException(e);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
private void addClassJavaDoc() {
|
||||
nodeFactory.addJavadoc("<em>WARNING: GENERATED CODE</em>\n\n")
|
||||
.addJavadoc("A factory for cache nodes optimized for a particular configuration.\n")
|
Reference in New Issue
Block a user