[zboy] First import
by Andrea Musuruane
commit df3a2631ef5d9937684988694b9d250e6ad2ff2b
Author: Andrea Musuruane <musuruan(a)gmail.com>
Date: Sun Jul 10 14:41:52 2016 +0200
First import
.gitignore | 1 +
sources | 1 +
zboy-0.60-mbc5.patch | 44 ++++++++++++++++++++
zboy-0.60-sfmt.patch | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++
zboy.spec | 74 +++++++++++++++++++++++++++++++++
5 files changed, 234 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4368198 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/zboy-0.60.tar.gz
diff --git a/sources b/sources
index e69de29..dd1e95d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+05a2f3586a011be9d89ccce797901dd4 zboy-0.60.tar.gz
diff --git a/zboy-0.60-mbc5.patch b/zboy-0.60-mbc5.patch
new file mode 100644
index 0000000..db851b5
--- /dev/null
+++ b/zboy-0.60-mbc5.patch
@@ -0,0 +1,44 @@
+Index: mbc5.c
+===================================================================
+--- mbc5.c (revisione 84)
++++ mbc5.c (revisione 85)
+@@ -18,7 +18,7 @@
+ */
+
+
+-inline uint8_t MBC5_MemoryRead(int memaddr) {
++uint8_t MBC5_MemoryRead(int memaddr) {
+ if ((memaddr >= 0xA000) && (memaddr < 0xC000)) { /* RAM bank n */
+ return(MemoryBankedRAM[(CurRamBank << 13) + memaddr]);
+ } else if ((memaddr >= 0x4000) && (memaddr < 0x8000)) { /* ROM bank #n */
+Index: mbc0.c
+===================================================================
+--- mbc0.c (revisione 84)
++++ mbc0.c (revisione 85)
+@@ -1,11 +1,11 @@
+ /*
+- --------------------------------------
+- This file is part of the zBoy project.
+- Copyright (C) Mateusz Viste 2010, 2011
+- --------------------------------------
+-
+- ROM-ONLY support
+-*/
++ * --------------------------------------------------------------------------
++ * This file is part of the zBoy project.
++ * Copyright (C) Mateusz Viste 2010, 2011, 2012, 2013, 2014, 2015
++ * --------------------------------------------------------------------------
++ *
++ * ROM-ONLY support
++ */
+
+
+ uint8_t MBC0_MemoryRead(int memaddr) {
+@@ -24,7 +24,5 @@
+
+
+ void MBC0_MemoryWrite(int memaddr, uint8_t DataByte) {
+- /*PRINT "MMU fatal error: Tried to write to an unknown memory address: "; HEX(memaddr)
+- QuitEmulator = 1 */
+ MemoryMAP[memaddr] = DataByte;
+ }
diff --git a/zboy-0.60-sfmt.patch b/zboy-0.60-sfmt.patch
new file mode 100644
index 0000000..57d844c
--- /dev/null
+++ b/zboy-0.60-sfmt.patch
@@ -0,0 +1,114 @@
+Index: printmsg.c
+===================================================================
+--- printmsg.c (revisione 74)
++++ printmsg.c (revisione 75)
+@@ -3,10 +3,11 @@
+ */
+
+ void SetUserMsg(char *msg) {
+- sprintf(UserMessage, msg);
++ strcpy(UserMessage, msg);
+ UserMessageFramesLeft = 120; /* Make the message to be active for 120 frames (2s) */
+ }
+
++
+ void PrintMsg(char *txtorgmessage, unsigned char TransparentFlag) {
+ /* TransparentFlag = 1 --> Do not clear the screen, and do not print background on chars
+ TransparentFlag = 0 --> Clear the screen before doing anything */
+@@ -15,7 +16,7 @@
+ signed int pixrow, pixcol, linenum = 0;
+ int x, textstring_len;
+ char textstring[1024], txtmessage[1024];
+- snprintf(txtmessage, 1023, txtorgmessage);
++ strncpy(txtmessage, txtorgmessage, 1023);
+ if (TransparentFlag == 0) {
+ for (pixcol = 0; pixcol < 160; pixcol++) {
+ for (pixrow = 0; pixrow < 144; pixrow++) ScreenBuffer[pixcol][pixrow] = 254;
+Index: Makefile.dos
+===================================================================
+--- Makefile.dos (revisione 74)
++++ Makefile.dos (revisione 75)
+@@ -1,4 +1,4 @@
+-CFLAGS = -s -std=gnu89 -O3 -Wall -Wextra -pedantic -Wfatal-errors -Wstrict-prototypes -D__zboy4dos__
++CFLAGS = -s -std=gnu89 -O3 -Wall -Wextra -pedantic -Werror=format-security -Wfatal-errors -Wstrict-prototypes -D__zboy4dos__
+
+
+ all: zboy.exe
+Index: zboy.c
+===================================================================
+--- zboy.c (revisione 74)
++++ zboy.c (revisione 75)
+@@ -300,7 +300,7 @@
+ } else { /* anything else is assumed to be a filename */
+ if (argv[x][0] != 0) { /* ignore if the parameter is empty */
+ if (RomInfos.Filename[0] == 0) {
+- snprintf(RomInfos.Filename, 1022, argv[x]);
++ strncpy(RomInfos.Filename, argv[x], 1022);
+ } else {
+ RomInfos.Filename[0] = 0; /* Clear out filename, to make sure to display usage screen later */
+ x = 250; /* make sure to quit parsing now */
+@@ -374,7 +374,7 @@
+ /* if a custom color palette has been provided, load it */
+ if (zboyparams.custcolor != NULL) {
+ if (LoadPaletteFromFile(zboyparams.custcolor, ScreenPalette32) != 0) {
+- sprintf(UserMessage, "LOADING THE CUSTOM PALETTE FAILED");
++ strcpy(UserMessage, "LOADING THE CUSTOM PALETTE FAILED");
+ PrintMsg(UserMessage, 0);
+ RefreshScreen(0, 159, 0, 143, &zboyparams);
+ PressAnyKey();
+@@ -470,7 +470,7 @@
+ if (RomInfos.NiceTitle[0] != 0) {
+ snprintf(zboyparams.windowtitle, 256, "%s (zBoy)", RomInfos.NiceTitle);
+ } else {
+- snprintf(zboyparams.windowtitle, 256, "zBoy");
++ strncpy(zboyparams.windowtitle, "zBoy", 256);
+ }
+ drv_setwintitle(zboyparams.windowtitle);
+
+Index: Makefile.win
+===================================================================
+--- Makefile.win (revisione 74)
++++ Makefile.win (revisione 75)
+@@ -1,5 +1,5 @@
+ INCLUDE = /mingw/include
+-CFLAGS = -s -std=gnu89 -O3 -Wall -pedantic -Wfatal-errors -Wstrict-prototypes -D__zboy4windows__ -DNETPLAY -DLFNAVAIL
++CFLAGS = -s -std=gnu89 -O3 -Wall -pedantic -Werror=format-security -Wfatal-errors -Wstrict-prototypes -D__zboy4windows__ -DNETPLAY -DLFNAVAIL
+
+
+ zboy.exe: about.o drv_sdl2.o loadpal.o loadrom.o net_sock.o config.o crc32.o wordwrap.o zboy.o
+Index: Makefile.linux
+===================================================================
+--- Makefile.linux (revisione 74)
++++ Makefile.linux (revisione 75)
+@@ -1,4 +1,4 @@
+-CFLAGS = -s -std=gnu89 -O3 -Wall -Wextra -pedantic -Wfatal-errors -Wstrict-prototypes -D__zboy4linux__ -DNETPLAY -DLFNAVAIL
++CFLAGS = -s -std=gnu89 -O3 -Wall -Wextra -pedantic -Werror=format-security -Wfatal-errors -Wstrict-prototypes -D__zboy4linux__ -DNETPLAY -DLFNAVAIL
+ #CFLAGS += -DDEBUGMODE
+
+
+Index: loadrominfos.c
+===================================================================
+--- loadrominfos.c (revisione 74)
++++ loadrominfos.c (revisione 75)
+@@ -19,7 +19,7 @@
+ while ((TempString[x] > 31) && (TempString[x] < 127) && (x < 16)) x++;
+ TempString[x] = 0; /* Trim all zeroed bytes at the end, as well as high bytes (occuring on new-style licenses) */
+ /*TempString = TRIM(TempString) */ /* Trim any spaces on both ends of the string */
+- sprintf(RomInfos->Title, TempString);
++ sprintf(RomInfos->Title, "%s", TempString);
+
+ /* Now let's see if we can fix the title in any possible way... */
+
+Index: mmu.c
+===================================================================
+--- mmu.c (revisione 74)
++++ mmu.c (revisione 75)
+@@ -127,7 +127,7 @@
+ }
+ } else {
+ sprintf(UserMessage, "MMU FATAL ERROR!\nTRIED TO RUN LCD OAM DMA TRANSFER USING AN INVALID RANGE!");
+- printf(UserMessage);
++ printf("%s", UserMessage);
+ PrintMsg(UserMessage, 0);
+ PressAnyKey();
+ exit(0);
diff --git a/zboy.spec b/zboy.spec
new file mode 100644
index 0000000..8c42ffb
--- /dev/null
+++ b/zboy.spec
@@ -0,0 +1,74 @@
+Name: zboy
+Version: 0.60
+Release: 2%{?dist}
+Summary: A GameBoy emulator
+
+License: GPLv3
+URL: http://zboy.sourceforge.net/
+Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+# Fix format strings
+# http://sourceforge.net/p/zboy/code/75/
+Patch0: %{name}-0.60-sfmt.patch
+# Fix compiling with GCC 5.1
+# http://sourceforge.net/p/zboy/code/85/
+Patch1: %{name}-0.60-mbc5.patch
+
+BuildRequires: SDL2-devel
+
+
+%description
+zBoy is a multiplatform GameBoy emulator that provides a load/save feature,
+can perform PCX screenshots either manually or automatically (every few
+seconds) and emulates an internal battery for ROMs that were designed to use
+one (this allows to use the internal save option provided by such games,
+remember highest scores, etc).
+
+zBoy supports some additional features, too, like intelligent saving of
+hi-scores for some games that aren't able to save their hi-scores table by
+themselves because of the lack of a battery-backed RAM on the cartridge, and
+improving screen's resolution output using graphic algorithms like Scale2x,
+Scale3x, eagle...
+
+It is also one of the very few GameBoy emulators that provides a 2-gameboys
+link emulation, which makes it possible to play some games in 2-players mode
+on a LAN.
+
+
+%prep
+%setup -q
+%patch0 -p0
+%patch1 -p0
+
+# Use standard Fedora CFLAGS to compile
+sed -i 's/^CFLAGS = -s -std=gnu89 -O3 -Wall -Wextra -pedantic -Werror=format-security -Wfatal-errors -Wstrict-prototypes/CFLAGS +=/' Makefile.linux
+
+# Fix end-of-line encoding
+for txtfile in license.txt history.txt todo.txt zboy.txt
+do
+ sed -i 's/\r//' $txtfile
+done
+
+
+%build
+export CFLAGS="%{optflags}"
+make %{?_smp_mflags} -f Makefile.linux
+
+
+%install
+mkdir -p %{buildroot}%{_bindir}
+install -p -m 0755 %{name} %{buildroot}%{_bindir}
+
+
+%files
+%{_bindir}/%{name}
+%license license.txt
+%doc colorize.txt history.txt todo.txt zboy.txt
+
+
+%changelog
+* Sun Oct 04 2015 Andrea Musuruane <musuruan(a)gmail.com> 0.60-2
+- Correctly marked license file
+
+* Thu May 14 2015 Andrea Musuruane <musuruan(a)gmail.com> 0.60-1
+- First release
+
8 years, 4 months
[rtmpdump] Update last git version (as usual)
by Sérgio M. Basto
commit f5c1911d22eec041d67fb17010775e07e81835e6
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Sun Jul 10 06:48:24 2016 +0100
Update last git version (as usual)
- Add license tag.
.gitignore | 1 +
rtmpdump.spec | 22 ++++++++++++++--------
sources | 2 +-
3 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 62ecaf6..7d0bd42 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
a107cef9b392616dff54fabfd37f985ee2190a6f.tar.gz
+/rtmpdump-fa8646d.tar.gz
diff --git a/rtmpdump.spec b/rtmpdump.spec
index 6157b86..dfa3240 100644
--- a/rtmpdump.spec
+++ b/rtmpdump.spec
@@ -1,17 +1,17 @@
-%global commit a107cef9b392616dff54fabfd37f985ee2190a6f
+%global commit fa8646daeb19dfd12c181f7d19de708d623704c0
%global shortcommit %(c=%{commit}; echo ${c:0:7})
-%global gitdate 20150925
+%global gitdate 20160224
Name: rtmpdump
Version: 2.4
-Release: 5.%{gitdate}.git%{shortcommit}%{?dist}
+Release: 6.%{gitdate}.git%{shortcommit}%{?dist}
Summary: Toolkit for RTMP streams
Group: Applications/Internet
# The tools are GPLv2+. The library is LGPLv2+, see below.
License: GPLv2+
URL: http://rtmpdump.mplayerhq.hu/
-Source0: http://repo.or.cz/w/rtmpdump.git/snapshot/%{commit}.tar.gz
+Source0: http://repo.or.cz/w/rtmpdump.git/snapshot/%{commit}.tar.gz#/rtmpdump-%{sh...
BuildRequires: gnutls-devel
BuildRequires: libgcrypt-devel
@@ -20,7 +20,7 @@ BuildRequires: nettle-devel
%description
rtmpdump is a toolkit for RTMP streams. All forms of RTMP are supported,
-including rtmp://, rtmpt://, rtmpe://, rtmpte://, and rtmps://.
+including rtmp://, rtmpt://, rtmpe://, rtmpte://, and rtmps://.
%package -n librtmp
Summary: Support library for RTMP streams
@@ -29,7 +29,7 @@ License: LGPLv2+
%description -n librtmp
librtmp is a support library for RTMP streams. All forms of RTMP are supported,
-including rtmp://, rtmpt://, rtmpe://, rtmpte://, and rtmps://.
+including rtmp://, rtmpt://, rtmpe://, rtmpte://, and rtmps://.
%package -n librtmp-devel
Summary: Files for librtmp development
@@ -56,7 +56,8 @@ rm -f %{buildroot}%{_libdir}/librtmp.a
%postun -n librtmp -p /sbin/ldconfig
%files
-%doc COPYING README
+%doc README
+%license COPYING
%{_bindir}/rtmpdump
%{_sbindir}/rtmpsrv
%{_sbindir}/rtmpgw
@@ -65,7 +66,8 @@ rm -f %{buildroot}%{_libdir}/librtmp.a
%{_mandir}/man8/rtmpgw.8*
%files -n librtmp
-%doc librtmp/COPYING ChangeLog
+%doc ChangeLog
+%license librtmp/COPYING
%{_libdir}/librtmp.so.1
%files -n librtmp-devel
@@ -75,6 +77,10 @@ rm -f %{buildroot}%{_libdir}/librtmp.a
%{_mandir}/man3/librtmp.3*
%changelog
+* Sun Jul 10 2016 Sérgio Basto <sergio(a)serjux.com> - 2.4-6.20160224.gitfa8646d
+- Update last git version (as usual)
+- Add license tag.
+
* Fri Nov 27 2015 Susi Lehtola <jussilehtola(a)fedoraproject.org> - 2.4-5.20150925.gita107cef
- Fix name of tarball in Sérgio's patch.
diff --git a/sources b/sources
index e73cf8a..d25216c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-16fabad33e8397b19fa674b28bfb8a96 a107cef9b392616dff54fabfd37f985ee2190a6f.tar.gz
+d9572fe5e1dedabb68b7949ec84308dd rtmpdump-fa8646d.tar.gz
8 years, 4 months
[dvd95/f24] forgot add patches
by Sérgio M. Basto
Summary of changes:
ff42765... forgot add patches (*)
(*) This commit already existed in another branch; no separate mail sent
8 years, 4 months
[dvd95] forgot add patches
by Sérgio M. Basto
commit ff42765184d0bcb461e7f0f26d8880a0045c3fc2
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Sun Jul 10 05:47:08 2016 +0100
forgot add patches
dvd95-format-security.patch | 22 ++++++++++++++++++++++
dvd95-hardening.patch | 11 +++++++++++
2 files changed, 33 insertions(+)
---
diff --git a/dvd95-format-security.patch b/dvd95-format-security.patch
new file mode 100644
index 0000000..dbc8fdc
--- /dev/null
+++ b/dvd95-format-security.patch
@@ -0,0 +1,22 @@
+--- dvd95-code-01dd592f7a8352d61fd5d8faa75463ebfd954980/src/uitools.c.orig 2016-07-10 05:24:20.128952672 +0100
++++ dvd95-code-01dd592f7a8352d61fd5d8faa75463ebfd954980/src/uitools.c 2016-07-10 05:28:54.336505447 +0100
+@@ -95,8 +95,9 @@ int MessageBoxError( char * format, ...
+ mbox = gtk_message_dialog_new( GTK_WINDOW(MainDlg),
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+- GTK_BUTTONS_OK,
+- (const gchar *)message );
++ GTK_BUTTONS_OK,
++ "%s",
++ (const gchar *) message );
+ gtk_dialog_run( GTK_DIALOG( mbox ) );
+ gtk_widget_destroy( GTK_WIDGET( mbox ) );
+ return( 0 );
+@@ -123,6 +124,7 @@ int MessageBoxYesNo( char * format, ...
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_YES_NO,
++ "%s",
+ (const gchar *)message );
+ b = gtk_dialog_run( GTK_DIALOG( mbox ) );
+ gtk_widget_destroy( GTK_WIDGET( mbox ) );
diff --git a/dvd95-hardening.patch b/dvd95-hardening.patch
new file mode 100644
index 0000000..1ca0bd7
--- /dev/null
+++ b/dvd95-hardening.patch
@@ -0,0 +1,11 @@
+--- dvd95-code-01dd592f7a8352d61fd5d8faa75463ebfd954980/configure.in.orig 2016-07-09 18:35:26.738348447 +0100
++++ dvd95-code-01dd592f7a8352d61fd5d8faa75463ebfd954980/configure.in 2016-07-10 04:00:33.515939022 +0100
+@@ -13,7 +13,7 @@ AC_ISC_POSIX
+ dnl
+ dnl warning flags; always add -Wall
+ dnl
+-CFLAGS="-Wall -O3"
++#CFLAGS="-Wall -O3"
+
+ AC_PROG_CC
+ AM_PROG_CC_STDC
8 years, 4 months
[dvd95] Update dvd95 to 1.7p0 last git version
by Sérgio M. Basto
commit 7a8d9998af73831f9557b157d1ec2e9871401f17
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Sun Jul 10 05:30:39 2016 +0100
Update dvd95 to 1.7p0 last git version
.gitignore | 1 +
dvd95.spec | 32 +++++++++++++++++---------------
sources | 2 +-
3 files changed, 19 insertions(+), 16 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5428ee2..2a14057 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
dvd95-1.6p0.tar.gz
+/dvd95-code-01dd592f7a8352d61fd5d8faa75463ebfd954980.zip
diff --git a/dvd95.spec b/dvd95.spec
index bb82fc4..d8c1558 100644
--- a/dvd95.spec
+++ b/dvd95.spec
@@ -1,13 +1,14 @@
Summary: Graphical dvd9 to dvd5 converter
Name: dvd95
-Version: 1.6p0
-Release: 7%{?dist}
+Version: 1.7p0
+Release: 1%{?dist}
License: GPL+
Group: Applications/Archiving
URL: http://dvd95.sourceforge.net/
-Source: http://downloads.sf.net/dvd95/dvd95-%{version}.tar.gz
+Source: https://sourceforge.net/code-snapshots/git/d/dv/dvd95/code.git/dvd95-code...
Patch0: dvd95-1.6p0-desktop.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+Patch1: dvd95-hardening.patch
+Patch2: dvd95-format-security.patch
Requires: mplayer
Requires: mencoder
Requires: ffmpeg
@@ -17,7 +18,7 @@ BuildRequires: mpeg2dec-devel
BuildRequires: mplayer
BuildRequires: mencoder
BuildRequires: ffmpeg
-BuildRequires: intltool
+BuildRequires: intltool libtool
# Needed, otherwise translations don't work and the program starts in French
BuildRequires: gettext
@@ -38,8 +39,11 @@ DVD95 support two copy modes :
%prep
-%setup -q
+%setup -q -n dvd95-code-01dd592f7a8352d61fd5d8faa75463ebfd954980
%patch0 -p1 -b .desktop
+%patch1 -p1 -b .hardening
+%patch2 -p1 -b .format-security
+autoreconf -i
%build
@@ -48,24 +52,22 @@ DVD95 support two copy modes :
%install
-%{__rm} -rf %{buildroot}
%{__make} install DESTDIR="%{buildroot}" prefix="%{_prefix}"
%find_lang %{name}
-%clean
-%{__rm} -rf %{buildroot}
-
-
%files -f %{name}.lang
-%defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING README TODO
+%doc AUTHORS ChangeLog README TODO
+%license COPYING
%{_bindir}/dvd95
%{_datadir}/applications/dvd95.desktop
%{_datadir}/pixmaps/dvd95/
%changelog
+* Sun Jul 10 2016 Sérgio Basto <sergio(a)serjux.com> - 1.7p0-1
+- Update dvd95 to 1.7p0 last git version
+
* Sun Aug 31 2014 Sérgio Basto <sergio(a)serjux.com> - 1.6p0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
@@ -88,10 +90,10 @@ DVD95 support two copy modes :
- Update to 1.6p0 (#1332).
- Add new (build)requirements : mplayer, mencoder, ffmpeg.
-* Wed Jul 10 2009 Matthias Saou <http://freshrpms.net/> 1.5p2-1
+* Fri Jul 10 2009 Matthias Saou <http://freshrpms.net/> 1.5p2-1
- Update to 1.5p2.
-* Mon Apr 14 2009 Matthias Saou <http://freshrpms.net/> 1.5p0-1
+* Tue Apr 14 2009 Matthias Saou <http://freshrpms.net/> 1.5p0-1
- Update to 1.5p0 (#546).
* Sun Mar 29 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.4p0-4
diff --git a/sources b/sources
index 7f0f6a2..9c024bf 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-bc820370cb1b3a95d361654a04a1792c dvd95-1.6p0.tar.gz
+14d0dd8d33bcc83084302cc438e24b5b dvd95-code-01dd592f7a8352d61fd5d8faa75463ebfd954980.zip
8 years, 4 months
[girl] Update to 9.4.0
by Martin Gansser
commit 9da73e51202b4693d721d6d67db8d03190a9423d
Author: Martin Gansser <mgansser(a)alice.de>
Date: Sat Jul 9 22:24:28 2016 +0200
Update to 9.4.0
clog | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/clog b/clog
new file mode 100644
index 0000000..997c675
--- /dev/null
+++ b/clog
@@ -0,0 +1,2 @@
+Update to 9.4.0
+
8 years, 4 months
[kisslicer] Initial import (#3985)
by Miro Hrončok
commit 3a51858ba51afdc5be44150c3271d5059b62ec0b
Author: Miro Hrončok <miro(a)hroncok.cz>
Date: Sat Jul 9 21:50:07 2016 +0200
Initial import (#3985)
.gitignore | 3 ++
kisslicer.spec | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 3 ++
3 files changed, 151 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..2d6f391 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/KISSlicer_Linux32_1_1_0.zip
+/KISSlicer_Linux64_1_1_0.zip
+/KISSlicer_Win32_1_1_0.zip
diff --git a/kisslicer.spec b/kisslicer.spec
new file mode 100644
index 0000000..ea33253
--- /dev/null
+++ b/kisslicer.spec
@@ -0,0 +1,145 @@
+Name: kisslicer
+%global cname KISSlicer
+%global maj 1
+%global min 1
+%global rev 0
+Version: %{maj}.%{min}.%{rev}
+Release: 1%{?dist}
+Summary: Keep It Simple Slicer
+URL: http://www.kisslicer.com/
+
+# License information: http://www.kisslicer.com/download.html "MAY be shared freely"
+License: Redistributable, no modification permitted
+
+# Download for both 64 and 32 bit
+Source0: %{url}/files/%{maj}%{min}%{rev}/%{cname}_Linux64_%{maj}_%{min}_%{rev}.zip
+Source1: %{url}/files/%{maj}%{min}%{rev}/%{cname}_Linux32_%{maj}_%{min}_%{rev}.zip
+# Get the Windows binary for icon extraction
+Source2: %{url}/files/%{maj}%{min}%{rev}/%{cname}_Win32_%{maj}_%{min}_%{rev}.zip
+
+BuildRequires: desktop-file-utils
+BuildRequires: /usr/bin/wrestool
+BuildRequires: /usr/bin/convert
+
+ExclusiveArch: %{ix86} x86_64
+%global debug_package %{nil}
+
+# Provide a capitalized version as well
+Provides: %{cname}%{?_isa} = %{version}-%{release}
+
+%description
+KISSlicer is a fast, easy-to-use, cross-platform program that takes 3D files
+(STL) and generates path information (G-code) for a 3D Printer. This FREE
+version has all the features needed for the hobbyist who uses a single-head
+machine.
+
+%prep
+
+# Unpack 64bit binary
+%ifarch x86_64
+%setup -qTc -b0
+%endif
+
+# Unpack 32bit binary
+%ifarch %{ix86}
+%setup -qTc -b1
+%endif
+
+# Unpack Windows binary
+%setup -qTD -a2
+
+
+%build
+# Extract the icon from the Windows binary
+wrestool -x -t 14 %{cname}.exe > %{name}.ico
+rm %{cname}.exe
+# And convert it to PNGs
+for res in 256 128 96 64 48; do
+ mkdir -p hicolor/${res}x${res}/apps
+done
+cd hicolor
+convert ../%{name}.ico %{name}.png
+mv %{name}-0.png 256x256/apps/%{name}.png
+mv %{name}-1.png 128x128/apps/%{name}.png
+mv %{name}-2.png 96x96/apps/%{name}.png
+mv %{name}-3.png 64x64/apps/%{name}.png
+mv %{name}-4.png 48x48/apps/%{name}.png
+rm %{name}-*.png
+cd -
+rm %{name}.ico
+
+
+%install
+# Install the binary into libexec, because it expects user-writable config files right next to it
+mkdir -p %{buildroot}%{_libexecdir}
+install -pm 0755 %{cname} %{buildroot}%{_libexecdir}/%{cname}
+
+# Shell wrapper that links the binary to home
+mkdir -p %{buildroot}%{_bindir}
+
+cat > %{buildroot}%{_bindir}/%{name} << EOF
+#!/bin/bash
+mkdir -p ~/.%{cname} 2>/dev/null
+[ ! -f ~/.%{cname}/%{cname} ] &&
+ ln -sf %{_libexecdir}/%{cname} ~/.%{cname}/%{cname}
+
+exec ~/.%{cname}/%{cname} "\$@"
+EOF
+
+# Also provides capitalized executable
+ln -sf %{name} %{buildroot}%{_bindir}/%{cname}
+
+# Make sure it's executable
+chmod 0755 %{buildroot}%{_bindir}/*
+
+# Icons
+mkdir -p %{buildroot}%{_datadir}/icons
+cp -r hicolor %{buildroot}%{_datadir}/icons
+
+# desktopfile
+mkdir -p %{buildroot}%{_datadir}/applications
+
+cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=%{cname}
+Comment=%{summary}
+Icon=%{name}
+TryExec=%{_bindir}/%{name}
+Exec=%{_bindir}/%{name} %U
+Terminal=false
+MimeType=application/sla;application/x-3ds;model/mesh;image/x-3ds;model/x3d+xml;model/x3d+binary;
+Categories=Graphics;3DGraphics;
+StartupNotify=true
+EOF
+
+%check
+desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
+
+%post
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+/usr/bin/update-desktop-database &>/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+ /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+/usr/bin/update-desktop-database &>/dev/null || :
+
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+update-desktop-database &>/dev/null || :
+
+%files
+%{_bindir}/%{name}
+%{_bindir}/%{cname}
+%{_libexecdir}/%{cname}
+%{_datadir}/applications/*
+%{_datadir}/icons/hicolor/*/apps/*
+
+
+%changelog
+* Mon Feb 22 2016 Miro Hrončok <mhroncok(a)redhat.com> - 1.1.0-1
+- Initial package
diff --git a/sources b/sources
index e69de29..7aa43dc 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,3 @@
+b2060cebd2caa5cd1d14ab3c015b80f1 KISSlicer_Linux32_1_1_0.zip
+14f84a3b450c46b1a4b68cd08e313724 KISSlicer_Linux64_1_1_0.zip
+1fe0cf4a51cf41460cfaf6724dce3ab5 KISSlicer_Win32_1_1_0.zip
8 years, 4 months