Commit f8175b78 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add libstemmer.

parent 1d3c6f85
# libstemmer
# http://snowball.tartarus.org/
[libstemmer]
recipe = slapos.recipe.cmmi
url = http://snowball.tartarus.org/dist/libstemmer_c.tgz
md5sum = 6f32f8f81cd6fa0150333ab540af5e27
patch-options = -p0
patches =
${:_profile_base_location_}/libstemmer.Makefile.patch#f337bfe457ecf00d3297043a153d402a
location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-command = true
make-options = DESTDIR=${:location}
--- Makefile.orig 2014-12-29 15:39:57.433970435 +0100
+++ Makefile 2014-12-29 15:54:42.115248445 +0100
@@ -1,9 +1,19 @@
include mkinc.mak
-CFLAGS=-Iinclude
-all: libstemmer.o stemwords
-libstemmer.o: $(snowball_sources:.c=.o)
- $(AR) -cru $@ $^
-stemwords: examples/stemwords.o libstemmer.o
- $(CC) -o $@ $^
+CFLAGS+=-Iinclude -fPIC
+DESTDIR=/usr/local
+all: libstemmer.so libstemmer.a stemwords
+libstemmer.so: $(snowball_sources:.c=.o)
+ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,$@.0d -o $@.0d.0.0 $^
+ ln -s $@.0d.0.0 $@.0d
+ ln -s $@.0d.0.0 $@
+libstemmer.a: $(snowball_sources:.c=.o)
+ $(AR) -crs $@ $^
+stemwords: examples/stemwords.o libstemmer.so
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
clean:
- rm -f stemwords *.o src_c/*.o runtime/*.o libstemmer/*.o
+ rm -f stemwords libstemmer.so* libstemmer.a *.o src_c/*.o runtime/*.o libstemmer/*.o
+install: all
+ mkdir -p $(DESTDIR)/include
+ mkdir -p $(DESTDIR)/lib
+ cp -a include/*.h $(DESTDIR)/include/
+ cp -a libstemmer.* $(DESTDIR)/lib/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment