parent
48dee3f9f5
commit
7137bc6b84
@ -0,0 +1,117 @@
|
|||||||
|
diff -ru optipng-0.5.4.orig/lib/pngxtern/scripts/gcc.mak optipng-0.5.4/lib/pngxtern/scripts/gcc.mak
|
||||||
|
--- optipng-0.5.4.orig/lib/pngxtern/scripts/gcc.mak 2006-05-10 21:15:00.000000000 +0200
|
||||||
|
+++ optipng-0.5.4/lib/pngxtern/scripts/gcc.mak 2006-09-14 22:17:47.528801620 +0200
|
||||||
|
@@ -17,7 +17,9 @@
|
||||||
|
CDEBUG = -g
|
||||||
|
LDDEBUG =
|
||||||
|
CRELEASE = -O2
|
||||||
|
-LDRELEASE = -s
|
||||||
|
+
|
||||||
|
+# remove -s from LDRELEASE to prevent stripping
|
||||||
|
+LDRELEASE =
|
||||||
|
CFLAGS = -Wall $(CRELEASE)
|
||||||
|
LDFLAGS = $(LDRELEASE)
|
||||||
|
LIBS = -lpng -lz -lm
|
||||||
|
@@ -37,7 +39,7 @@
|
||||||
|
all: pngxtern$(A)
|
||||||
|
|
||||||
|
.c$(O):
|
||||||
|
- $(CC) -c $(CFLAGS) -I$(ZDIR) -I$(PNGDIR) $<
|
||||||
|
+ $(CC) -c $(CFLAGS) $<
|
||||||
|
|
||||||
|
pngxtern$(A): $(OBJS)
|
||||||
|
$(AR_RC) $@ $(OBJS)
|
||||||
|
diff -ru optipng-0.5.4.orig/src/scripts/gcc.mak optipng-0.5.4/src/scripts/gcc.mak
|
||||||
|
--- optipng-0.5.4.orig/src/scripts/gcc.mak 2006-07-15 16:25:00.000000000 +0200
|
||||||
|
+++ optipng-0.5.4/src/scripts/gcc.mak 2006-09-14 22:17:06.910263120 +0200
|
||||||
|
@@ -13,30 +13,27 @@
|
||||||
|
CC = gcc
|
||||||
|
LD = $(CC)
|
||||||
|
CFLAGS = -O2 -Wall
|
||||||
|
-LDFLAGS = -s
|
||||||
|
+# remove -s from LDFLAGS to prevent stripping
|
||||||
|
+LDFLAGS =
|
||||||
|
|
||||||
|
OPTIPNG = optipng$(EXE)
|
||||||
|
ZLIB = libz.a
|
||||||
|
PNGLIB = libpng.a
|
||||||
|
PNGXLIB = pngxtern.a
|
||||||
|
-ZMAK = Makefile
|
||||||
|
-PNGMAK = scripts/makefile.gcc
|
||||||
|
PNGXMAK = scripts/gcc.mak
|
||||||
|
-ZDIR = ../lib/zlib
|
||||||
|
-PNGDIR = ../lib/libpng
|
||||||
|
PNGXDIR = ../lib/pngxtern
|
||||||
|
BACKHERE = ../../src
|
||||||
|
|
||||||
|
OBJS = optipng.o opngio.o opngreduc.o cbitset.o osys.o strutil.o
|
||||||
|
-LIBS = $(PNGXDIR)/$(PNGXLIB) $(PNGDIR)/$(PNGLIB) $(ZDIR)/$(ZLIB)
|
||||||
|
+LIBS = $(PNGXDIR)/$(PNGXLIB)
|
||||||
|
|
||||||
|
|
||||||
|
$(OPTIPNG): $(OBJS) $(LIBS)
|
||||||
|
- $(LD) -o $(OPTIPNG) $(LDFLAGS) $(OBJS) $(LIBS)
|
||||||
|
+ $(LD) -o $(OPTIPNG) $(LDFLAGS) $(OBJS) $(LIBS) -lpng -lz
|
||||||
|
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
- $(CC) -c $(CFLAGS) -I$(ZDIR) -I$(PNGDIR) -I$(PNGXDIR) $*.c
|
||||||
|
+ $(CC) -c $(CFLAGS) -I$(PNGXDIR) $*.c
|
||||||
|
|
||||||
|
optipng.o : optipng.c proginfo.h opng.h cexcept.h cbitset.h osys.h strutil.h
|
||||||
|
opngio.o : opngio.c opng.h
|
||||||
|
@@ -46,35 +43,23 @@
|
||||||
|
strutil.o : strutil.c strutil.h
|
||||||
|
|
||||||
|
|
||||||
|
-$(PNGXDIR)/$(PNGXLIB): $(ZDIR)/$(ZLIB) $(PNGDIR)/$(PNGLIB)
|
||||||
|
+$(PNGXDIR)/$(PNGXLIB):
|
||||||
|
cd $(PNGXDIR); \
|
||||||
|
$(MAKE) -f $(PNGXMAK) $(PNGXLIB); \
|
||||||
|
cd $(BACKHERE)
|
||||||
|
|
||||||
|
-$(PNGDIR)/$(PNGLIB): $(ZDIR)/$(ZLIB)
|
||||||
|
- cd $(PNGDIR); \
|
||||||
|
- $(MAKE) -f $(PNGMAK) $(PNGLIB); \
|
||||||
|
- cd $(BACKHERE)
|
||||||
|
-
|
||||||
|
-$(ZDIR)/$(ZLIB):
|
||||||
|
- cd $(ZDIR); \
|
||||||
|
- ./configure; \
|
||||||
|
- $(MAKE) -f $(ZMAK) $(ZLIB); \
|
||||||
|
- cd $(BACKHERE)
|
||||||
|
-
|
||||||
|
-
|
||||||
|
install: $(OPTIPNG)
|
||||||
|
- -@if [ ! -d ${bindir} ]; then mkdir -p ${bindir}; fi
|
||||||
|
- -@if [ ! -d ${man1dir} ]; then mkdir -p ${man1dir}; fi
|
||||||
|
- -@rm -f ${bindir}/$(OPTIPNG)
|
||||||
|
- -@rm -f ${man1dir}/optipng.1
|
||||||
|
- cp -p $(OPTIPNG) ${bindir}
|
||||||
|
- cp -p ../man/optipng.1 ${man1dir}
|
||||||
|
+ -@if [ ! -d ${DESTDIR}/${bindir} ]; then mkdir -p ${DESTDIR}/${bindir}; fi
|
||||||
|
+ -@if [ ! -d ${DESTDIR}/${man1dir} ]; then mkdir -p ${DESTDIR}/${man1dir}; fi
|
||||||
|
+ -@rm -f ${DESTDIR}/${bindir}/$(OPTIPNG)
|
||||||
|
+ -@rm -f ${DESTDIR}/${man1dir}/optipng.1
|
||||||
|
+ cp -p $(OPTIPNG) ${DESTDIR}/${bindir}
|
||||||
|
+ cp -p ../man/optipng.1 ${DESTDIR}/${man1dir}
|
||||||
|
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
- rm -f ${bindir}/$(OPTIPNG)
|
||||||
|
- rm -f ${man1dir}/optipng.1
|
||||||
|
+ rm -f ${DESTDIR}/${bindir}/$(OPTIPNG)
|
||||||
|
+ rm -f ${DESTDIR}/${man1dir}/optipng.1
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@@ -82,9 +67,3 @@
|
||||||
|
cd $(PNGXDIR); \
|
||||||
|
$(MAKE) -f $(PNGXMAK) clean; \
|
||||||
|
cd $(BACKHERE)
|
||||||
|
- cd $(PNGDIR); \
|
||||||
|
- $(MAKE) -f $(PNGMAK) clean; \
|
||||||
|
- cd $(BACKHERE)
|
||||||
|
- cd $(ZDIR); \
|
||||||
|
- $(MAKE) -f $(ZMAK) clean; \
|
||||||
|
- cd $(BACKHERE)
|
@ -0,0 +1,63 @@
|
|||||||
|
Name: optipng
|
||||||
|
Version: 0.5.4
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: OptiPNG is a PNG optimizer and converter
|
||||||
|
|
||||||
|
Group: Applications/Multimedia
|
||||||
|
License: zlib/libpng
|
||||||
|
URL: http://optipng.sourceforge.net/
|
||||||
|
Source0: http://surfnet.dl.sourceforge.net/sourceforge/optipng/optipng-%{version}.tar.gz
|
||||||
|
Patch0: optipng-0.5.4-makefile.patch
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
|
BuildRequires: zlib-devel libpng-devel
|
||||||
|
|
||||||
|
%description
|
||||||
|
OptiPNG is a PNG optimizer that recompresses image files to a smaller size,
|
||||||
|
without losing any information. This program also converts external formats
|
||||||
|
(BMP, GIF, PNM; TIFF support is coming up) to optimized PNG, and performs PNG
|
||||||
|
integrity checks and corrections.
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
cd src/
|
||||||
|
make -f scripts/gcc.mak %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
cd src/
|
||||||
|
make -f scripts/gcc.mak install DESTDIR="$RPM_BUILD_ROOT"\
|
||||||
|
prefix="%{_prefix}" \
|
||||||
|
man1dir="%{_mandir}/man1"
|
||||||
|
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc README.txt LICENSE.txt doc/*
|
||||||
|
%{_bindir}/optipng
|
||||||
|
%{_mandir}/man1/optipng.1.gz
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Sep 14 2006 Till Maas <opensource[AT]till.name> - 0.5.4-1
|
||||||
|
- version bump
|
||||||
|
- use system zlib and libpng
|
||||||
|
- link without "-s" flag for non-empty debuginfo
|
||||||
|
- use DESTDIR
|
||||||
|
* Fri Jul 28 2006 Till Maas <opensource[AT]till.name> - 0.5.3-1
|
||||||
|
- version bump
|
||||||
|
- Changed license tag back to zlib/libpng (#198616 rpmlint)
|
||||||
|
- use $RPM_OPT_FLAGS instead of %%{optflags}
|
||||||
|
* Thu Jul 06 2006 Till Maas <opensource[AT]till.name> - 0.5.2-2
|
||||||
|
- Changed license tag from zlib/libpng to zlib
|
||||||
|
* Tue Jul 04 2006 Till Maas <opensource[AT]till.name> - 0.5.2-1
|
||||||
|
- Created from scratch for fedora extras
|
Loading…
Reference in new issue