initial import
This commit is contained in:
59
libbulletml/Makefile
Normal file
59
libbulletml/Makefile
Normal file
@@ -0,0 +1,59 @@
|
||||
INCLUDES = -I. -I../d_cpp
|
||||
CXXFLAGS ?= -O2 -W -Wall -ansi -pedantic
|
||||
CXXFLAGS += -ansi
|
||||
CFLAGS ?= -O2
|
||||
prefix ?= /usr/local
|
||||
VDIR = tinyxml
|
||||
|
||||
includedir ?= $(prefix)/include
|
||||
libdir ?= $(prefix)/lib
|
||||
|
||||
MAJOR=0d2
|
||||
MINOR=0
|
||||
|
||||
VPATH=.:tinyxml
|
||||
OBJS = bulletmlparser-tinyxml.o bulletmlparser.o bulletmltree.o calc.o \
|
||||
formula-variables.o bulletmlrunner.o bulletmlrunnerimpl.o bulletml_d.o
|
||||
TINYXML = tinyxml.o tinyxmlerror.o tinyxmlparser.o
|
||||
|
||||
all: bulletml.d libbulletml.a libbulletml.so.$(MAJOR).$(MINOR)
|
||||
|
||||
libbulletml.a: $(OBJS) $(TINYXML)
|
||||
$(AR) cru $@ $^
|
||||
|
||||
libbulletml.so.$(MAJOR).$(MINOR): $(OBJS) $(TINYXML)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -fPIC -fpic \
|
||||
-Wl,-soname,libbulletml.so.$(MAJOR) \
|
||||
-o $@ $^
|
||||
|
||||
bulletml.d: bulletml_d.cpp
|
||||
perl ../d_cpp/create_d_import.pl bulletml_d.cpp bulletml.d
|
||||
|
||||
clean:
|
||||
rm -f calc.cpp libbulletml.a libbulletml.so.$(MAJOR).$(MINOR) *.o tinyxml/*.o
|
||||
|
||||
calc.cpp: calc.yy
|
||||
bison -y calc.yy -o calc.cpp
|
||||
|
||||
$(OBJS) $(TINYXML): %.o: %.cpp
|
||||
$(CXX) -c $(CXXFLAGS) -fPIC -fpic $(INCLUDES) $<
|
||||
|
||||
doxy:
|
||||
doxygen
|
||||
|
||||
install: all
|
||||
install -D -m 644 bulletml.d $(DESTDIR)/$(includedir)/d/bulletml.d
|
||||
install -D -m 644 tinyxml/tinyxml.h \
|
||||
$(DESTDIR)/$(includedir)/bulletml/tinyxml/tinyxml.h
|
||||
install -m 644 *.h $(DESTDIR)/$(includedir)/bulletml
|
||||
install -d $(DESTDIR)/$(libdir)
|
||||
install -m 644 libbulletml.a $(DESTDIR)/$(libdir)
|
||||
install -m 644 libbulletml.so.$(MAJOR).$(MINOR) $(DESTDIR)/$(libdir)
|
||||
ln -f -r -s \
|
||||
$(DESTDIR)/$(libdir)/libbulletml.so.$(MAJOR).$(MINOR) \
|
||||
$(DESTDIR)/$(libdir)/libbulletml.so.$(MAJOR)
|
||||
ln -f -r -s \
|
||||
$(DESTDIR)/$(libdir)/libbulletml.so.$(MAJOR).$(MINOR) \
|
||||
$(DESTDIR)/$(libdir)/libbulletml.so
|
||||
|
||||
.PHONY: all clean doxy install
|
||||
48
libbulletml/PKGBUILD
Normal file
48
libbulletml/PKGBUILD
Normal file
@@ -0,0 +1,48 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=libbulletml
|
||||
pkgver=0.0.6
|
||||
_debver=$pkgver
|
||||
_debrel=7
|
||||
pkgrel=1
|
||||
pkgdesc="C++ library to handle the markup language BulletML easily"
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html'
|
||||
license=('GPL-2' 'zlib' 'Modified-BSD' 'Simplified-BSD')
|
||||
makedepends=('quilt')
|
||||
source=("https://deb.debian.org/debian/pool/main/b/bulletml/bulletml_${pkgver}.orig.tar.gz"
|
||||
"https://deb.debian.org/debian/pool/main/b/bulletml/bulletml_${_debver}-${_debrel}.debian.tar.xz"
|
||||
"Makefile")
|
||||
sha512sums=('916eff772459384bfbf9b646ebe267dc23f0d54dc2ac1d783fecefa6a212b09566bfc254609be3a0f0fe536fa8252b67ad4892f043d731a2a33b57b9544695e9'
|
||||
'843158d73989df2bd0d2e8c6921c0e53572aea9f66118e1e80e587587b035cf4a2d0efe4556117be9f7c654bef4721b9593f9871d6482a73b35b25634afdade9'
|
||||
'ae7136201f4fa5c8225df55dc8c5719bf65f459926b21e07f6a77e00b7b51273c3d8761bcae44c05be2276826e2eda664e65808e59103564c8cd65d91e2a9316')
|
||||
|
||||
prepare() {
|
||||
cd bulletml
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
cp "${srcdir}/Makefile" src
|
||||
}
|
||||
|
||||
build() {
|
||||
make -C bulletml/src
|
||||
}
|
||||
|
||||
package() {
|
||||
cd bulletml
|
||||
make -C src DESTDIR="$pkgdir" prefix=/usr install
|
||||
|
||||
install -D -m 644 README "$pkgdir/usr/share/doc/libbulletml/README.jp"
|
||||
install -m 644 README.en "$pkgdir/usr/share/doc/libbulletml"
|
||||
install -m 644 README.bulletml "$pkgdir/usr/share/doc/libbulletml"
|
||||
|
||||
install -D -m 644 debian/copyright -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
Reference in New Issue
Block a user