diff --git a/compface-1.5.2-destdir.diff b/compface-1.5.2-destdir.diff new file mode 100644 index 0000000..dc99248 --- /dev/null +++ b/compface-1.5.2-destdir.diff @@ -0,0 +1,81 @@ +o Build shared library, link tools against it +o Make it possible to prevent stripping +o Add DESTDIR support + +--- Makefile.in~ 2005-10-04 15:59:49.000000000 +0300 ++++ Makefile.in 2006-08-02 22:23:07.000000000 +0300 +@@ -15,6 +15,7 @@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_DATA = @INSTALL_DATA@ + SHELL = /bin/sh ++STRIP = strip + + NAME = compface + UNNAME = uncompface +@@ -25,6 +26,7 @@ + UNEXECUTABLE = $(BINDIR)/$(UNNAMEEXE) + LIBNAME = lib$(NAME).a + LIBRARY = $(LIBDIR)/$(LIBNAME) ++SHLIBNAME = lib$(NAME).so + MAN1DIR = $(MANDIR)/man1 + MAN3DIR = $(MANDIR)/man3 + OBJECTS = arith.o file.o compress.o gen.o uncompface.o +@@ -45,11 +47,11 @@ + + all: $(NAMEEXE) $(UNNAMEEXE) + +-$(NAMEEXE) : cmain.o compface.o $(LIBNAME) +- $(CC) $(LDFLAGS) -o $@ cmain.o compface.o $(LIBNAME) ++$(NAMEEXE) : cmain.o compface.o $(SHLIBNAME) ++ $(CC) $(LDFLAGS) -o $@ cmain.o compface.o -L. -l$(NAME) + +-$(UNNAMEEXE) : uncmain.o $(LIBNAME) +- $(CC) $(LDFLAGS) -o $@ uncmain.o $(LIBNAME) ++$(UNNAMEEXE) : uncmain.o $(SHLIBNAME) ++ $(CC) $(LDFLAGS) -o $@ uncmain.o -L. -l$(NAME) + + $(LIBNAME) : $(OBJECTS) + ar rc $(LIBNAME) $(OBJECTS) +@@ -73,25 +75,28 @@ + tar chzf `cat .fname`.tar.gz `cat .fname` + $(RM) -rf `cat .fname` .fname + +-install: $(NAMEEXE) $(UNNAMEEXE) $(LIBNAME) +- $(INSTALL_PROGRAM) -d $(BINDIR) $(LIBDIR) $(MAN1DIR) $(MAN3DIR) $(INCLUDEDIR) +- $(INSTALL_PROGRAM) $(srcdir)/$(NAMEEXE) $(EXECUTABLE) +- -chmod 0755 $(EXECUTABLE) +- -strip $(EXECUTABLE) +- $(INSTALL_PROGRAM) $(srcdir)/$(UNNAMEEXE) $(UNEXECUTABLE) +- -chmod 0755 $(UNEXECUTABLE) +- -strip $(UNEXECUTABLE) +- $(INSTALL_DATA) $(srcdir)/$(NAME).1 $(MAN1DIR)/$(NAME).1 +- cd $(MAN1DIR) && $(RM) ./$(UNNAME).1 && $(LN_S) $(NAME).1 $(UNNAME).1 +- $(INSTALL_DATA) $(srcdir)/$(NAME).3 $(MAN3DIR)/$(NAME).3 +- cd $(MAN3DIR) && $(RM) ./$(UNNAME).3 && $(LN_S) $(NAME).3 $(UNNAME).3 +- for hdr in $(INSTALLHEADERS); do $(INSTALL_DATA) $(srcdir)/$${hdr} $(INCLUDEDIR)/$${hdr}; done +- $(INSTALL_DATA) $(srcdir)/$(LIBNAME) $(LIBRARY) ++install: $(NAMEEXE) $(UNNAMEEXE) $(SHLIBNAME) ++ $(INSTALL_PROGRAM) -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(MAN1DIR) $(DESTDIR)$(MAN3DIR) $(DESTDIR)$(INCLUDEDIR) ++ $(INSTALL_PROGRAM) $(srcdir)/$(NAMEEXE) $(DESTDIR)$(EXECUTABLE) ++ -$(STRIP) $(DESTDIR)$(EXECUTABLE) ++ $(INSTALL_PROGRAM) $(srcdir)/$(UNNAMEEXE) $(DESTDIR)$(UNEXECUTABLE) ++ -$(STRIP) $(DESTDIR)$(UNEXECUTABLE) ++ $(INSTALL_DATA) $(srcdir)/$(NAME).1 $(DESTDIR)$(MAN1DIR)/$(NAME).1 ++ cd $(DESTDIR)$(MAN1DIR) && $(RM) ./$(UNNAME).1 && $(LN_S) $(NAME).1 $(UNNAME).1 ++ $(INSTALL_DATA) $(srcdir)/$(NAME).3 $(DESTDIR)$(MAN3DIR)/$(NAME).3 ++ cd $(DESTDIR)$(MAN3DIR) && $(RM) ./$(UNNAME).3 && $(LN_S) $(NAME).3 $(UNNAME).3 ++ for hdr in $(INSTALLHEADERS); do $(INSTALL_DATA) $(srcdir)/$${hdr} $(DESTDIR)$(INCLUDEDIR)/$${hdr}; done ++ $(INSTALL_PROGRAM) $(srcdir)/$(SHLIBNAME) $(DESTDIR)$(LIBDIR)/$(SHLIBNAME).1.0.0 ++ $(LN_S) $(SHLIBNAME).1.0.0 $(DESTDIR)$(LIBDIR)/$(SHLIBNAME).1 ++ $(LN_S) $(SHLIBNAME).1 $(DESTDIR)$(LIBDIR)/$(SHLIBNAME) + + shar : + shar.script $(OTHERS) $(HDRS) $(SOURCES) > $(NAME).sh + compress $(NAME).sh + ++$(SHLIBNAME): $(OBJECTS) ++ $(CC) -shared -Wl,-soname,$(SHLIBNAME).1 $(LDFLAGS) -o $(SHLIBNAME) $(OBJECTS) ++ + .c.o: + $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $< + diff --git a/compface-1.5.2.diff b/compface-1.5.2.diff index 35a1fd7..c4e21b4 100644 --- a/compface-1.5.2.diff +++ b/compface-1.5.2.diff @@ -1,16 +1,3 @@ ---- Makefile.in -+++ Makefile.in -@@ -77,10 +77,8 @@ - $(INSTALL_PROGRAM) -d $(BINDIR) $(LIBDIR) $(MAN1DIR) $(MAN3DIR) $(INCLUDEDIR) - $(INSTALL_PROGRAM) $(srcdir)/$(NAMEEXE) $(EXECUTABLE) - -chmod 0755 $(EXECUTABLE) -- -strip $(EXECUTABLE) - $(INSTALL_PROGRAM) $(srcdir)/$(UNNAMEEXE) $(UNEXECUTABLE) - -chmod 0755 $(UNEXECUTABLE) -- -strip $(UNEXECUTABLE) - $(INSTALL_DATA) $(srcdir)/$(NAME).1 $(MAN1DIR)/$(NAME).1 - cd $(MAN1DIR) && $(RM) ./$(UNNAME).1 && $(LN_S) $(NAME).1 $(UNNAME).1 - $(INSTALL_DATA) $(srcdir)/$(NAME).3 $(MAN3DIR)/$(NAME).3 --- config.h +++ config.h @@ -30,3 +30,7 @@ diff --git a/compface-test.xbm b/compface-test.xbm new file mode 100644 index 0000000..68b4b46 --- /dev/null +++ b/compface-test.xbm @@ -0,0 +1,23 @@ +#define noname_width 48 +#define noname_height 48 +static char noname_bits[] = { + 0xFC,0xFF,0xFF,0xFF,0xFF,0x7F,0xFC,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xDF,0x56,0x95,0x24,0x00,0xE0, + 0xBF,0xBD,0x55,0xD5,0x6E,0xE5,0xEF,0xF7,0xFF,0x6F,0xBB,0xEB,0xAF,0xFF,0xFF, + 0xFF,0xFF,0xE7,0xDF,0xFF,0xDF,0xFE,0xFF,0xE7,0xFF,0xFF,0x0F,0x00,0xE0,0xEF, + 0xAF,0xFF,0x07,0x00,0xE0,0xE3,0xEF,0xFF,0x07,0x00,0xE0,0xE7,0xDF,0xFF,0x03, + 0x00,0xE0,0xE7,0xDF,0xFF,0x07,0x00,0xE0,0xEF,0xFF,0xFF,0x03,0x00,0xF0,0xE7, + 0xCF,0xFF,0x03,0x88,0xFC,0xE7,0xFF,0xFF,0x03,0xFC,0xFF,0xE7,0x8F,0xFF,0x03, + 0xFE,0xFF,0xE7,0xFF,0xFF,0x03,0xD4,0xFF,0xE7,0xD7,0xFF,0x03,0x00,0xFE,0xE7, + 0xEF,0xFF,0x01,0x00,0xFF,0xE7,0xCF,0xFF,0x01,0x00,0xFE,0xE7,0xDF,0xFF,0x01, + 0x00,0xFE,0xE7,0xDF,0xFF,0x01,0x00,0xFF,0xE7,0xEF,0xFF,0x00,0xA0,0xFF,0xE3, + 0xCF,0xFF,0x80,0xFF,0xFF,0xE7,0xDF,0xFF,0x00,0xFF,0xFF,0xE7,0xDF,0xFF,0x80, + 0xFF,0xFF,0xE7,0xEF,0xFF,0x80,0xFF,0xFF,0xC3,0xCF,0x7F,0x80,0xFF,0xFF,0xE7, + 0xAF,0xFF,0x80,0xFF,0xFF,0xE7,0xDF,0x7F,0x80,0xFF,0xFF,0xE7,0xAF,0x7F,0xC0, + 0xFF,0xFF,0xC3,0xD7,0x7F,0xC0,0xFF,0xFF,0xE7,0xEF,0x7F,0xC0,0xFF,0xFF,0xC7, + 0xCF,0x3F,0xC0,0xFF,0xFF,0xE7,0xAF,0x3F,0xC0,0xFF,0xFF,0xC3,0xDF,0x3F,0xE0, + 0xFF,0xFF,0xE7,0xCF,0x3F,0xC0,0xFF,0xFF,0xC7,0xDF,0x7F,0xF0,0xFF,0xFF,0xC7, + 0xCF,0xFF,0xFF,0xFF,0xFF,0xE3,0x9F,0xFF,0xFF,0xFF,0xFF,0xC7,0xAF,0x52,0x55, + 0x95,0x00,0xE0,0x2F,0x02,0x00,0x00,0x04,0xC0,0x4F,0x49,0x2A,0x01,0x10,0xE0, + 0xFF,0xFF,0xFF,0xFF,0xF7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0xFF,0xFF, + 0xFF,0xFF,0x7F}; diff --git a/compface.changes b/compface.changes index 7dc649d..20b18c0 100644 --- a/compface.changes +++ b/compface.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Oct 8 12:45:25 UTC 2014 - tchvatal@suse.com + +- Grab patches from debian to actually work correctly + * added compface-1.5.2-destdir.diff + * added libcompface_1.5.2-5.diff.gz + * modified compface-1.5.2.diff +- Create test to verify the thing works + * added compface-test.xbm +- Use shared library +- Cleanup the specfile + ------------------------------------------------------------------- Tue Mar 27 08:08:10 UTC 2012 - cfarrell@suse.com diff --git a/compface.spec b/compface.spec index a1504b0..56fed68 100644 --- a/compface.spec +++ b/compface.spec @@ -1,7 +1,7 @@ # # spec file for package compface # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,16 +15,23 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: compface -Summary: 48x48x1 Image Compression and Decompression Version: 1.5.2 Release: 0 -Group: Productivity/Graphics/Convertors +Summary: Library and tools for handling X-Face data License: MIT +Group: Productivity/Graphics/Convertors +Url: http://www.xemacs.org/Download/optLibs.html Source: http://ftp.xemacs.org/pub/xemacs/aux/compface-%{version}.tar.gz Source1: xbm2face -Patch: compface-%{version}.diff +Source2: compface-test.xbm +Patch0: http://ftp.debian.org/debian/pool/main/libc/libcompface/libcompface_1.5.2-5.diff.gz +Patch1: compface-1.5.2.diff +Patch2: compface-1.5.2-destdir.diff +BuildRequires: autoconf BuildRequires: automake +BuildRequires: libtool BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -35,39 +42,55 @@ inclusion of face images within mail headers using the field name decompression algorithms to be used in other programs, such as mail dispatchers and mail notification daemons. +%package devel +Summary: Library and development files for handling X-Face data +Group: Development/Libraries +Requires: %{name} = %{version} - -Authors: --------- - James Ashton +%description devel +These files are needed when building software that uses the Compface +library. %prep -%setup -%patch +%setup -q +%patch0 -p1 +%patch1 +%patch2 + +# do not strip +sed -i "/strip/d" Makefile.in %build autoreconf -fi -CFLAGS="$RPM_OPT_FLAGS -fPIC" INSTALL="install -D" \ -./configure --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} -make %{?jobs:-j%jobs} +CFLAGS="%{optflags} -fPIC" \ +%configure +make %{?_smp_mflags} %install -make install prefix=$RPM_BUILD_ROOT%{_prefix} \ - LIBDIR=$RPM_BUILD_ROOT%{_libdir} \ - MANDIR=$RPM_BUILD_ROOT%{_mandir} +%make_install sed -i 's/\r//' xbm2xface.pl -install -m 755 xbm2xface.pl $RPM_BUILD_ROOT%{_prefix}/bin/xbm2xface -install -m 755 $RPM_SOURCE_DIR/xbm2face $RPM_BUILD_ROOT%{_prefix}/bin +install -m 755 xbm2xface.pl %{buildroot}%{_bindir}/xbm2xface +install -m 755 $RPM_SOURCE_DIR/xbm2face %{buildroot}%{_prefix}/bin -%clean -rm -fr $RPM_BUILD_ROOT +%check +export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH +./compface %{SOURCE2} | ./uncompface -X > __test.xbm +cmp %{SOURCE2} __test.xbm + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig %files %defattr(-, root, root) %doc README -%{_prefix}/bin/* -%{_prefix}/include/* -%{_libdir}/lib* +%{_bindir}/* +%{_libdir}/*.so.* %doc %{_mandir}/man?/* +%files devel +%defattr(-, root, root) +%{_includedir}/compface.h +%{_libdir}/libcompface.so + %changelog diff --git a/libcompface_1.5.2-5.diff.gz b/libcompface_1.5.2-5.diff.gz new file mode 100644 index 0000000..c4daf63 --- /dev/null +++ b/libcompface_1.5.2-5.diff.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0587f531d09aa229618e4f648ca085a816a8d35cb4d35e216446c7462ffef733 +size 13673