-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12425bb
commit 341430f
Showing
5 changed files
with
111 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#@IgnoreInspection BashAddShebang | ||
# Maintainers: Abby and Thomas at [email protected] | ||
pkgname=plep | ||
pkgver=v1.2.4 | ||
pkgver=v1.2.5 | ||
pkgrel=1 | ||
epoch= | ||
pkgdesc=" An agenda for planning a few tasks per day right on your desktop." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Desktop Entry] | ||
Encoding=UTF-8 | ||
Name=Plep | ||
Icon=plep32 | ||
Exec=/usr/bin/plep | ||
Terminal=false | ||
Type=Application | ||
Categories=Applications; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
Name: plep | ||
Version: 1.2.5 | ||
Release: 1%{?dist} | ||
Summary: An agenda for planning a few tasks per day right on your desktop. | ||
|
||
License: MIT | ||
|
||
URL: https://github.com/deltadak/plep | ||
|
||
Source0: %{name}-%{version}.tar.gz | ||
Source1: %{name}.desktop | ||
|
||
Requires: java-1.8.0-openjdk-devel, java-1.8.0-openjdk-openjfx | ||
|
||
BuildArch: noarch | ||
|
||
%define debug_package %{nil} | ||
|
||
%description | ||
I am plep. | ||
|
||
%prep | ||
# Create a /name folder and extract the tar there (it includes the src | ||
# folder, licence, gradle build files...) | ||
# This also cds into the folder | ||
%setup -c -n %{name} | ||
|
||
|
||
%build | ||
# "stolen" from build() in the PKGBUILD file in /releasing/arch-linux | ||
|
||
# Build the jars, generate database file | ||
./gradlew build | ||
|
||
# Generate files in build/install/ such that /plep/bin/plep can be | ||
# executed, and all jars are in /plep/lib. | ||
# (to execute it - for now - go to /plep/bin and run ./plep, otherwise it will look for the global plep, which isn't configured yet.) | ||
./gradlew installDist | ||
|
||
|
||
%install | ||
# "stolen" from package() in the PKGBUILD file in /releasing/arch-linux | ||
|
||
# /usr/bin | ||
mkdir -p %{buildroot}%{_bindir} | ||
# /usr/lib | ||
mkdir -p %{buildroot}/usr/lib/%{name} | ||
|
||
# Copy all the install files to /usr/lib/plep | ||
cp -a %{_builddir}/%{name}/build/install/%{name}/. %{buildroot}/usr/lib/%{name} | ||
|
||
# Create a file with a command to execute the file which calls java to execute the jar. | ||
echo "#!/bin/sh | ||
/usr/lib/%{name}/bin/%{name}" > %{buildroot}%{_bindir}/%{name} | ||
|
||
# Copy an empty database (generated by gradle build) so we can set permissions on it | ||
cp %{_builddir}/%{name}/build/classes/kotlin/plep.db %{buildroot}/usr/lib/%{name}/lib/ | ||
|
||
# Make plep executable. | ||
chmod a+x %{buildroot}%{_bindir}/%{name} | ||
# Make database folder executable and writable. | ||
chmod a+rwx %{buildroot}/usr/lib/%{name} | ||
# Make database writable. | ||
chmod a+w %{buildroot}/usr/lib/%{name}/lib | ||
chmod a+w %{buildroot}/usr/lib/%{name}/lib/plep.db | ||
chmod a+w %{buildroot}/usr/lib/%{name}/lib/%{name}-v%{version}.jar | ||
|
||
# Copy the icon to the place it belongs. | ||
mkdir -p %{buildroot}/usr/share/icons | ||
cp %{_builddir}/%{name}/src/main/resources/plep32.png %{buildroot}/usr/share/icons | ||
|
||
# Build the desktop file. | ||
desktop-file-install --dir=%{buildroot}/usr/share/applications %{_builddir}/%{name}/releasing/fedora/%{name}.desktop | ||
|
||
|
||
%files | ||
%{_bindir}/%{name} | ||
/usr/lib/%{name} | ||
/usr/share/applications/%{name}.desktop | ||
/usr/share/icons/ |