From 9c559b94e20c6de4db319310cc412e6f574b6059 Mon Sep 17 00:00:00 2001 From: Packit Date: Sep 14 2020 11:55:47 +0000 Subject: Apply patch libgdither-0.6-default.patch patch_name: libgdither-0.6-default.patch present_in_specfile: true --- diff --git a/Makefile b/Makefile index d2793d8..988de27 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 0.6 -PREFIX = /usr/local -CFLAGS = -Wall -g -I. -O3 -funroll-loops -finline-limit=9999999 -ffast-math -malign-double -march=`uname -m` -fPIC +PREFIX = /usr +CFLAGS = $(INIT_CFLAGS) -I. -ffast-math -fPIC TARDIR = libgdither-$(VERSION) @@ -10,20 +10,22 @@ gdither.o: gdither.c gdither.h gdither_types_internal.h $(CC) $(CFLAGS) -c gdither.c libgdither.so: gdither.o - $(CC) -shared gdither.o -o libgdither.so + $(CC) -shared gdither.o -Wl,-soname,libgdither.so.1 -o libgdither.so.1.0 libgdither.pc: libgdither.pc.in Makefile sed -e 's|@VERSION@|$(VERSION)|' -e 's|@PREFIX@|$(PREFIX)|' \ libgdither.pc.in > libgdither.pc install: all - install -d $(PREFIX)/lib/ - install libgdither.so $(PREFIX)/lib/ - install -d $(PREFIX)/include/ - install gdither.h $(PREFIX)/include/ - install gdither_types.h $(PREFIX)/include/ - install -d $(PREFIX)/lib/pkgconfig/ - install libgdither.pc $(PREFIX)/lib/pkgconfig/ + mkdir -p $(DESTDIR)$(LIBDIR) + install -pm 0755 libgdither.so* $(DESTDIR)$(LIBDIR) + ln -s libgdither.so.1.0 $(DESTDIR)$(LIBDIR)/libgdither.so.1 + ln -s libgdither.so.1.0 $(DESTDIR)$(LIBDIR)/libgdither.so + mkdir -p $(DESTDIR)$(PREFIX)/include/libgdither + install -pm 0644 gdither.h $(DESTDIR)$(PREFIX)/include/libgdither + install -pm 0644 gdither_types.h $(DESTDIR)$(PREFIX)/include/libgdither + mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig/ + install -pm 0644 libgdither.pc $(DESTDIR)$(LIBDIR)/pkgconfig/ clean: rm -f *.o *.so diff --git a/Makefile.default b/Makefile.default new file mode 100644 index 0000000..d2793d8 --- /dev/null +++ b/Makefile.default @@ -0,0 +1,47 @@ +VERSION = 0.6 +PREFIX = /usr/local +CFLAGS = -Wall -g -I. -O3 -funroll-loops -finline-limit=9999999 -ffast-math -malign-double -march=`uname -m` -fPIC + +TARDIR = libgdither-$(VERSION) + +all: libgdither.so + +gdither.o: gdither.c gdither.h gdither_types_internal.h + $(CC) $(CFLAGS) -c gdither.c + +libgdither.so: gdither.o + $(CC) -shared gdither.o -o libgdither.so + +libgdither.pc: libgdither.pc.in Makefile + sed -e 's|@VERSION@|$(VERSION)|' -e 's|@PREFIX@|$(PREFIX)|' \ + libgdither.pc.in > libgdither.pc + +install: all + install -d $(PREFIX)/lib/ + install libgdither.so $(PREFIX)/lib/ + install -d $(PREFIX)/include/ + install gdither.h $(PREFIX)/include/ + install gdither_types.h $(PREFIX)/include/ + install -d $(PREFIX)/lib/pkgconfig/ + install libgdither.pc $(PREFIX)/lib/pkgconfig/ + +clean: + rm -f *.o *.so + (cd tests && make clean) + (cd examples && make clean) + +dist: all libgdither.pc + rm -rf $(TARDIR) + mkdir -p $(TARDIR)/tests $(TARDIR)/examples + cp README COPYING Makefile *.c *.h libgdither.pc \ + $(TARDIR) + cp tests/Makefile tests/*.[ch] tests/*.cc \ + $(TARDIR)/tests/ + cp examples/Makefile examples/*.[ch] \ + $(TARDIR)/examples/ + (cd $(TARDIR) && make test clean) + tar cfz $(TARDIR).tar.gz $(TARDIR) + @rm -rf $(TARDIR) + +test: all + (cd tests && make test) diff --git a/libgdither.pc b/libgdither.pc index 4aa7a01..855c2b7 100644 --- a/libgdither.pc +++ b/libgdither.pc @@ -6,4 +6,4 @@ Name: libgdither Version: 0.6 Description: A library for applying dithering to PCM audio sources Libs: -L${libdir} -lgdither -lm -Cflags: -I${includedir} +Cflags: -I${includedir}/libgdither diff --git a/libgdither.pc.default b/libgdither.pc.default new file mode 100644 index 0000000..4aa7a01 --- /dev/null +++ b/libgdither.pc.default @@ -0,0 +1,9 @@ +prefix=/usr/local +libdir=/usr/local/lib +includedir=/usr/local/include + +Name: libgdither +Version: 0.6 +Description: A library for applying dithering to PCM audio sources +Libs: -L${libdir} -lgdither -lm +Cflags: -I${includedir}