1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
Description: debian multiarch tune-up
Author: Milan Kupcevic <milan@debian.org>
Forwarded: not-needed
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/simavr/simavr.pc
+++ b/simavr/simavr.pc
@@ -1,10 +1,11 @@
prefix=PREFIX
exec_prefix=${prefix}
includedir=${prefix}/include
-libdir=${exec_prefix}/lib
+libdir=${exec_prefix}/libMA
Name: simavr
Description: Atmel(tm) AVR 8 bits simulator
Version: VERSION
Cflags: -I${includedir}/simavr
-Libs: -L${libdir} -lsimavr -lelf
+Libs: -L${libdir} -lsimavr
+Requires.private: libelf
--- a/simavr/simavr-avr.pc
+++ b/simavr/simavr-avr.pc
@@ -6,8 +6,7 @@
Name: simavr-avr
Description: Atmel(tm) AVR 8 bits simulator - avr-gcc flags
Version: VERSION
-Cflags: -I${includedir}/simavr/avr -ffunction-sections -fdata-sections \
- -Wl,--relax,--gc-sections \
- -Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000
-Libs:
+Cflags: -I${includedir}/simavr/avr -ffunction-sections -fdata-sections
+Libs: -Wl,--relax,--gc-sections \
+ -Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000
--- a/simavr/simavrparts.pc
+++ b/simavr/simavrparts.pc
@@ -1,10 +1,12 @@
prefix=PREFIX
exec_prefix=${prefix}
-includedir=${prefix}/include/
-libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+libdir=${exec_prefix}/libMA
-Name: simavr
+Name: simavrparts
Description: Virtual parts library for simavr
Version: VERSION
Cflags: -I${includedir}/simavr/parts
-Libs: -L${libdir} -lsimavrparts -lsimavr
+Libs: -L${libdir} -lsimavrparts
+Requires.private: simavr gl
+Libs.private: -lpthread -lutil
--- a/simavr/Makefile
+++ b/simavr/Makefile
@@ -71,34 +71,34 @@
rm -rf ${target} *.a *.so *.exe
rm -f sim_core_*.h
-DESTDIR = /usr/local
-PREFIX = ${DESTDIR}
+PREFIX = /usr/local
-install : all
- $(MKDIR) $(DESTDIR)/include/simavr/avr
- $(MKDIR) $(DESTDIR)/include/simavr/parts
- $(INSTALL) -m644 sim/*.h $(DESTDIR)/include/simavr/
- $(INSTALL) -m644 sim_core_*.h $(DESTDIR)/include/simavr/
- $(INSTALL) -m644 sim/avr/*.h $(DESTDIR)/include/simavr/avr/
- $(INSTALL) -m644 ../examples/parts/*.h $(DESTDIR)/include/simavr/parts/
- $(MKDIR) $(DESTDIR)/lib
- $(INSTALL) ${OBJ}/libsimavr.a $(DESTDIR)/lib/
- $(INSTALL) ../examples/parts/${OBJ}/libsimavrparts.a $(DESTDIR)/lib/
- $(MKDIR) $(DESTDIR)/lib/pkgconfig/
+install :
+ $(MKDIR) $(DESTDIR)$(PREFIX)/include/simavr/avr
+ $(MKDIR) $(DESTDIR)$(PREFIX)/include/simavr/parts
+ $(INSTALL) -m644 sim/*.h $(DESTDIR)$(PREFIX)/include/simavr/
+ $(INSTALL) -m644 sim_core_*.h $(DESTDIR)$(PREFIX)/include/simavr/
+ $(INSTALL) -m644 sim/avr/*.h $(DESTDIR)$(PREFIX)/include/simavr/avr/
+ $(INSTALL) -m644 ../examples/parts/*.h $(DESTDIR)$(PREFIX)/include/simavr/parts/
+ $(MKDIR) $(DESTDIR)$(PREFIX)/lib$(MA)
+ $(INSTALL) ${OBJ}/libsimavr.a $(DESTDIR)$(PREFIX)/lib$(MA)/
+ $(INSTALL) ../examples/parts/${OBJ}/libsimavrparts.a $(DESTDIR)$(PREFIX)/lib$(MA)/
+ $(MKDIR) $(DESTDIR)$(PREFIX)/lib/pkgconfig/
sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \
- simavr-avr.pc >$(DESTDIR)/lib/pkgconfig/simavr-avr.pc
+ simavr-avr.pc >$(DESTDIR)$(PREFIX)/lib/pkgconfig/simavr-avr.pc
+ $(MKDIR) $(DESTDIR)$(PREFIX)/lib$(MA)/pkgconfig/
sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \
- simavr.pc >$(DESTDIR)/lib/pkgconfig/simavr.pc
+ -e "s|MA|${MA}|g" \
+ simavr.pc >$(DESTDIR)$(PREFIX)/lib$(MA)/pkgconfig/simavr.pc
sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \
- simavrparts.pc >$(DESTDIR)/lib/pkgconfig/simavrparts.pc
-ifeq (${shell uname}, Linux)
- $(INSTALL) ${OBJ}/libsimavr.so.1 $(DESTDIR)/lib/
- $(INSTALL) ../examples/parts/${OBJ}/libsimavrparts.so.1 $(DESTDIR)/lib/
- ln -sf libsimavr.so.1 $(DESTDIR)/lib/libsimavr.so
- ln -sf libsimavrparts.so.1 $(DESTDIR)/lib/libsimavrparts.so
-endif
- $(MKDIR) $(DESTDIR)/bin
- $(INSTALL) ${OBJ}/${target}.elf $(DESTDIR)/bin/simavr
+ -e "s|MA|${MA}|g" \
+ simavrparts.pc >$(DESTDIR)$(PREFIX)/lib$(MA)/pkgconfig/simavrparts.pc
+ $(INSTALL) ${OBJ}/libsimavr.so.2 $(DESTDIR)$(PREFIX)/lib$(MA)/
+ $(INSTALL) ../examples/parts/${OBJ}/libsimavrparts.so.1 $(DESTDIR)$(PREFIX)/lib$(MA)/
+ ln -sf libsimavr.so.2 $(DESTDIR)$(PREFIX)/lib$(MA)/libsimavr.so
+ ln -sf libsimavrparts.so.1 $(DESTDIR)$(PREFIX)/lib$(MA)/libsimavrparts.so
+ $(MKDIR) $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) ${OBJ}/${target}.elf $(DESTDIR)$(PREFIX)/bin/simavr
# Needs 'fpm', oneline package manager. Install with 'gem install fpm'
# This generates 'mock' debian files, without all the policy, scripts
|