merging FLUKSO-2-0-beta-1

This commit is contained in:
Bart Van Der Meerssche 2011-05-12 00:02:22 +02:00
commit 559853c6f1
11451 changed files with 1298299 additions and 101540 deletions

35
README
View File

@ -1,8 +1,31 @@
This repository holds the code for the community metering project called Flukso and is split into following subsections: Welcome to the Flukso repository.
- web/drupal: theme and modules that turn a stock Drupal installation into www.flukso.net
- web/api: our Erlang/Webmachine-based JSON/REST code for api.flukso.net
- openwrt: contains openwrt packages/patches/make menuconfig to tweak a stock openwrt kamikaze build into a Fluksometer
- uc: the microcontroller code that is loaded onto the sensor board's AVR.
Enjoy! The repository is structured as follows:
* mote/v[1|2]/openwrt
The modules, patches and scripts needed to tailor a stock OpenWRT Backfire to
the Fluksometer hardware. The bulk of development will now be taking place in
the v2 directory which maps to the v2 hardware.
* mote/v[1|2]/eagle
The Eagle schematic, board and BOM files for building a v1 or v2 Flukso sensor
board.
* mote/v[1|2]/avr
The AVR microcontroller code for the Flukso sensor board.
* server/api
The Erlang/Webmachine code that handles the Flukso server's JSON/REST API.
* server/drupal
Custom Drupal v6 modules that transform a Drupal 6 installation into a community
metering web platform, see a.o. www.flukso.net or www.mysmartgrid.de.
For more information about this project and to see the code in action, surf to
www.flukso.net.
Interested in contributing code- or schematic-wise? Then please join the
flukso-dev mailing list.
You can sign up via the web: http://lists.flukso.net/mailman/listinfo/flukso-dev.
Or simply drop a mail to this address: flukso-dev-join@lists.flukso.net.
You can also harass us via IRC in the #flukso channel on freenode.
Happy metering!
Bart. Bart.

286
mote/v1/avr/Makefile Executable file
View File

@ -0,0 +1,286 @@
# Arduino 0011 Makefile
# Arduino adaptation by mellis, eighthave, oli.keller
#
# This makefile allows you to build sketches from the command line
# without the Arduino environment (or Java).
#
# Detailed instructions for using the makefile:
#
# 1. Copy this file into the folder with your sketch. There should be a
# file with the extension .pde (e.g. foo.pde)
#
# 2. Below, modify the line containing "TARGET" to refer to the name of
# of your program's file without an extension (e.g. TARGET = foo).
#
# 3. Modify the line containg "INSTALL_DIR" to point to the directory that
# contains the Arduino installation (for example, under Mac OS X, this
# might be /Applications/arduino-0011).
#
# 4. Modify the line containing "PORT" to refer to the filename
# representing the USB or serial connection to your Arduino board
# (e.g. PORT = /dev/tty.USB0). If the exact name of this file
# changes, you can use * as a wildcard (e.g. PORT = /dev/tty.USB*).
#
# 5. Set the line containing "MCU" to match your board's processor.
# Older one's are atmega8 based, newer ones like Arduino Mini, Bluetooth
# or Diecimila have the atmega168. If you're using a LilyPad Arduino,
# change F_CPU to 8000000.
#
# 6. At the command line, change to the directory containing your
# program's file and the makefile.
#
# 7. Type "make" and press enter to compile/verify your program.
#
# 8. Type "make upload", reset your Arduino board, and press enter to
# upload your program to the Arduino board.
#
# $Id$
###############################################################################
#
# project specific settings:
#
TARGET = main
#
# Predefine the TYPE and SENSORx C macros in main.h via this Makefile.
# Override the defaults on the command line by typing:
# make PHASE=x METERCONST=y SENSOR0=z ...
#
DBG = 0
# analog settings
TYPE = 2300501
PHASE = 1
METERCONST= 5508
# pulse settings
PULSE_CONST_2 = 1
PULSE_HALF_2 = 0
PULSE_CONST_3 = 1
PULSE_HALF_3 = 0
PULSE_CONST_4 = 1
PULSE_HALF_4 = 0
#
SENSOR0 = 0123456789abcdef0123456789abcde0
SENSOR1 = 0123456789abcdef0123456789abcde1
SENSOR2 = 0123456789abcdef0123456789abcde2
SENSOR3 = 0123456789abcdef0123456789abcde3
#
CEXTRA = -D DBG=$(DBG) -D PHASE=$(PHASE) -D METERCONST=$(METERCONST) -D PULSE_CONST_2=$(PULSE_CONST_2) -D PULSE_HALF_2=$(PULSE_HALF_2) -D PULSE_CONST_3=$(PULSE_CONST_3) -D PULSE_HALF_3=$(PULSE_HALF_3) -D PULSE_CONST_4=$(PULSE_CONST_4) -D PULSE_HALF_4=$(PULSE_HALF_4) -D 'SENSOR0="$(SENSOR0)"' -D 'SENSOR1="$(SENSOR1)"' -D 'SENSOR2="$(SENSOR2)"' -D 'SENSOR3="$(SENSOR3)"'
###############################################################################
###############################################################################
#
# serial uploader settings
#
PORT = /dev/ttyUSB*
UPLOAD_RATE = 19200
AVRDUDE_PROGRAMMER = usbtiny
#
# HINT: If you want to use the automatic reset feature which comes with Arduino
# Diecimila, put the follwoing in your avrdude.conf:
# (Use the systemwide $(INSTALL_DIR)/tools/avr/etc/avrdude.conf or create a
# local $HOME/.avrduderc file)
#
# programmer
# id = "arduino";
# desc = "Arduino Serial Bootloader";
# type = stk500;
# reset = 7;
# # since Arduino Diecimila the serial DTR line can be used to trigger a reset!
# ;
#
# After this you can specify AVRDUDE_PROGRAMMER = arduino, above.
# On older boards you can manually ad this reset feature. Wire a cable from the
# FTDI 232 Chip's DTR pin (the number differs from package to package, see datasheet)
# to the RESET line of the ATmega. Inbetween this connection must be a 100nF capacitor.
#####################################################################################
#####################################################################################
#
# hardware dependent settings
#
MCU = atmega48
F_CPU = 1000000
#####################################################################################
#####################################################################################
#
# Below here nothing should be changed...
#
#####################################################################################
AVR_TOOLS_PATH = /usr/bin
SRC = wiring/serial.c
FORMAT = ihex
# Name of this Makefile (used for "make depend").
MAKEFILE = Makefile
# Debugging format.
# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
DEBUG = stabs
OPT = s
# Place -D or -U options here
CDEFS = -DF_CPU=$(F_CPU)
CXXDEFS = -DF_CPU=$(F_CPU)
# Compiler flag to set the C Standard level.
# c89 - "ANSI" C
# gnu89 - c89 plus GCC extensions
# c99 - ISO C99 standard (not yet fully implemented)
# gnu99 - c99 plus GCC extensions
CSTANDARD = -std=gnu99
CDEBUG = -g$(DEBUG)
CWARN = -Wall -Wstrict-prototypes
CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
CFLAGS = $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CSTANDARD) $(CEXTRA)
CXXFLAGS = $(CDEFS) $(CINCS) -O$(OPT)
#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
LDFLAGS = -lm
# Programming support using avrdude. Settings and variables.
AVRDUDE_PORT = $(PORT)
AVRDUDE_WRITE_FUSES= -U lfuse:w:0x6E:m -U hfuse:w:0xD6:m -U efuse:w:0x1:m
AVRDUDE_WRITE_FLASH = -U flash:w:bin/$(TARGET).hex
AVRDUDE_WRITE_EEPROM = -U eeprom:w:bin/$(TARGET).eep
AVRDUDE_FLAGS = -p $(MCU) -c $(AVRDUDE_PROGRAMMER) -b $(UPLOAD_RATE)
# Program settings
CC = $(AVR_TOOLS_PATH)/avr-gcc
CXX = $(AVR_TOOLS_PATH)/avr-g++
OBJCOPY = $(AVR_TOOLS_PATH)/avr-objcopy
OBJDUMP = $(AVR_TOOLS_PATH)/avr-objdump
AR = $(AVR_TOOLS_PATH)/avr-ar
SIZE = $(AVR_TOOLS_PATH)/avr-size
NM = $(AVR_TOOLS_PATH)/avr-nm
AVRDUDE = avrdude
REMOVE = rm -f
MV = mv -f
# Define all object files.
OBJ = $(SRC:.c=.o) $(CXXSRC:.cpp=.o) $(ASRC:.S=.o)
# Define all listing files.
LST = $(ASRC:.S=.lst) $(CXXSRC:.cpp=.lst) $(SRC:.c=.lst)
# Combine all necessary flags and optional flags.
# Add target processor to flags.
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS)
ALL_CXXFLAGS = -mmcu=$(MCU) -I. $(CXXFLAGS)
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
# Default target.
all: bin_files build sizeafter
build: elf hex eep
bin_files: $(TARGET).c
@test -d bin || mkdir bin
@cp $(TARGET).c bin/$(TARGET).c
elf: bin/$(TARGET).elf
hex: bin/$(TARGET).hex
eep: bin/$(TARGET).eep
lss: bin/$(TARGET).lss
sym: bin/$(TARGET).sym
# Program the device.
upload: bin/$(TARGET).hex
@$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FUSES) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) bin/$(TARGET).hex
ELFSIZE = $(SIZE) bin/$(TARGET).elf
sizebefore:
@if [ -f bin/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
sizeafter:
@if [ -f bin/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(HEXSIZE); echo; fi
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
COFFCONVERT=$(OBJCOPY) --debugging \
--change-section-address .data-0x800000 \
--change-section-address .bss-0x800000 \
--change-section-address .noinit-0x800000 \
--change-section-address .eeprom-0x810000
coff: bin/$(TARGET).elf
$(COFFCONVERT) -O coff-avr bin/$(TARGET).elf $(TARGET).cof
extcoff: $(TARGET).elf
$(COFFCONVERT) -O coff-ext-avr bin/$(TARGET).elf $(TARGET).cof
.SUFFIXES: .elf .hex .eep .lss .sym
.elf.hex:
@$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
.elf.eep:
@$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
# Create extended listing file from ELF output file.
.elf.lss:
$(OBJDUMP) -h -S $< > $@
# Create a symbol table from ELF output file.
.elf.sym:
$(NM) -n $< > $@
# Link: create ELF output file from library.
bin/$(TARGET).elf: $(TARGET).c bin/core.a
@$(CC) $(ALL_CFLAGS) -o $@ bin/$(TARGET).c -L. bin/core.a $(LDFLAGS)
bin/core.a: $(OBJ)
@for i in $(OBJ); do $(AR) rcs bin/core.a $$i; done
# Compile: create object files from C++ source files.
.cpp.o:
@$(CXX) -c $(ALL_CXXFLAGS) $< -o $@
# Compile: create object files from C source files.
.c.o:
@$(CC) -c $(ALL_CFLAGS) $< -o $@
# Compile: create assembler files from C source files.
.c.s:
$(CC) -S $(ALL_CFLAGS) $< -o $@
# Assemble: create object files from assembler source files.
.S.o:
$(CC) -c $(ALL_ASFLAGS) $< -o $@
# Target: clean project.
clean:
@$(REMOVE) bin/$(TARGET).hex bin/$(TARGET).eep bin/$(TARGET).cof bin/$(TARGET).elf \
bin/$(TARGET).map bin/$(TARGET).sym bin/$(TARGET).lss bin/$(TARGET).c bin/core.a \
$(OBJ) $(LST) $(SRC:.c=.s) $(SRC:.c=.d) $(CXXSRC:.cpp=.s) $(CXXSRC:.cpp=.d)
depend:
if grep '^# DO NOT DELETE' $(MAKEFILE) >/dev/null; \
then \
sed -e '/^# DO NOT DELETE/,$$d' $(MAKEFILE) > \
$(MAKEFILE).$$$$ && \
$(MV) $(MAKEFILE).$$$$ $(MAKEFILE); \
fi
echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' \
>> $(MAKEFILE); \
$(CC) -M -mmcu=$(MCU) $(CDEFS) $(CINCS) $(SRC) $(ASRC) >> $(MAKEFILE)
.PHONY: all build elf hex eep lss sym program coff extcoff clean depend bin_files sizebefore sizeafter

389
mote/v1/avr/main.c Normal file
View File

@ -0,0 +1,389 @@
//
// main.c : AVR uC code for flukso sensor board
//
// Copyright (c) 2008-2009 jokamajo.org
// 2010 flukso.net
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// $Id$
#include <string.h>
#include <stdlib.h>
#include "wiring/wiring_private.h"
#include "main.h"
#include <avr/io.h>
// pin/register/ISR definitions
#include <avr/interrupt.h>
// eeprom library
#include <avr/eeprom.h>
// watchdog timer library
#include <avr/wdt.h>
// variable declarations
volatile struct state aux[4] = {{false, false, false, START, 0}, {false, false, false, START, 0}, {false, false, false, START, 0}, {false, false, false, START, 0}};
volatile struct sensor EEMEM EEPROM_measurements[4] = {{SENSOR0, START}, {SENSOR1, START}, {SENSOR2, START}, {SENSOR3, START}};
volatile struct sensor measurements[4];
volatile struct time_struct time = {false, 0};
volatile uint8_t muxn = 0;
volatile uint16_t timer = 0;
// interrupt service routine for INT0
ISR(INT0_vect) {
pulse_add(&measurements[2], &aux[2], PULSE_CONST_2, PULSE_HALF_2);
}
// interrupt service routine for INT1
ISR(INT1_vect) {
pulse_add(&measurements[3], &aux[3], PULSE_CONST_3, PULSE_HALF_3);
}
// interrupt service routine for PCI2 (PCINT20)
/**
ISR(PCINT2_vect) {
if (aux[4].toggle == false) {
aux[4].toggle = true;
}
else {
pulse_add(&measurements[4], &aux[4], PULSE_CONST_4, PULSE_HALF_4);
}
}
**/
void pulse_add(volatile struct sensor *measurement, volatile struct state *aux, uint32_t pulse_const, uint32_t pulse_half) {
measurement->value += pulse_const;
if (aux->half == true) {
measurement->value += 1;
}
if (pulse_half) {
aux->half = !aux->half;
}
aux->pulse = true;
aux->time = time.ms;
}
// interrupt service routine for ADC
ISR(TIMER2_COMPA_vect) {
#if DBG > 0
PORTD |= (1<<PD4);
#endif
// read ADC result
// add to nano(Wh) counter
#if PHASE == 2
MacU16X16to32(aux[0].nano, METERCONST, ADC);
#else
MacU16X16to32(aux[muxn].nano, METERCONST, ADC);
#endif
if (aux[muxn].nano > WATT) {
measurements[muxn].value++;
aux[muxn].pulse = true;
aux[muxn].nano -= WATT;
aux[muxn].pulse_count++;
}
if (timer == SECOND) {
aux[muxn].nano_start = aux[muxn].nano_end;
aux[muxn].nano_end = aux[muxn].nano;
aux[muxn].pulse_count_final = aux[muxn].pulse_count;
aux[muxn].pulse_count = 0;
aux[muxn].power = true;
}
// cycle through the available ADC input channels (0 and 1)
muxn++;
if (!(muxn &= 0x1)) timer++;
if (timer > SECOND) timer = 0;
// We have timer interrupts occcuring at a frequency of 1250Hz.
// In order to map this to 1000Hz (=ms) we have to skip every fifth interrupt.
if (!time.skip) time.ms++;
time.skip = (((time.ms & 0x3) == 3) && !time.skip) ? true : false;
ADMUX &= 0xF8;
ADMUX |= muxn;
// start a new ADC conversion
ADCSRA |= (1<<ADSC);
#if DBG > 0
PORTD &= ~(1<<PD4);
#endif
#if DBG > 1
aux[muxn].nano = WATT+1;
timer = SECOND;
#endif
}
// interrupt service routine for analog comparator
ISR(ANALOG_COMP_vect) {
uint8_t i;
//debugging:
//measurements[3].value = END3;
//measurements[2].value = END2;
//measurements[1].value = END1;
//measurements[0].value = END0;
//disable uC sections to consume less power while writing to EEPROM
//disable UART Tx and Rx:
UCSR0B &= ~((1<<RXEN0) | (1<<TXEN0));
//disable ADC:
ADCSRA &= ~(1<<ADEN);
for (i=0; i<4; i++)
eeprom_write_block((const void*)&measurements[i].value, (void*)&EEPROM_measurements[i].value, 4);
//indicate writing to EEPROM has finished by lighting up the green LED
PORTB |= (1<<PB5);
//enable UART Tx and Rx:
UCSR0B |= (1<<RXEN0) | (1<<TXEN0);
// enable ADC and start a first ADC conversion
ADCSRA |= (1<<ADEN) | (1<<ADSC);
printString("msg BROWN-OUT\n");
}
// interrupt service routine for watchdog timeout
ISR(WDT_vect) {
uint8_t i;
for (i=0; i<4; i++)
eeprom_write_block((const void*)&measurements[i].value, (void*)&EEPROM_measurements[i].value, 4);
printString("msg WDT\n");
}
// disable WDT
void WDT_off(void) {
cli();
wdt_reset();
// clear the WDT reset flag in the status register
MCUSR &= ~(1<<WDRF);
// timed sequence to be able to change the WDT settings afterwards
WDTCSR |= (1<<WDCE) | (1<<WDE);
// disable WDT
WDTCSR = 0x00;
}
// enable WDT
void WDT_on(void) {
// enable the watchdog timer (2s)
wdt_enable(WDTO_2S);
// set watchdog interrupt enable flag
WDTCSR |= (1<<WDIE);
}
void setup()
{
// WDT_off(); -> moved the call to this function to start of the main loop, before init
// clock settings: divide by 8 to get a 1Mhz clock, allows us to set the BOD level to 1.8V (DS p.37)
CLKPR = (1<<CLKPCE);
CLKPR = (1<<CLKPS1) | (1<<CLKPS0);
// load meterid's and metervalues from EEPROM
eeprom_read_block((void*)&measurements, (const void*)&EEPROM_measurements, sizeof(measurements));
// init serial port
beginSerial(4800);
_delay_ms(100);
//LEDPIN=PB5/SCK configured as output pin
DDRB |= (1<<PB5);
// PD2=INT0 and PD3=INT1 configuration
// set as input pin with 20k pull-up enabled
PORTD |= (1<<PD2) | (1<<PD3);
// INT0 and INT1 to trigger an interrupt on a falling edge
EICRA = (1<<ISC01) | (1<<ISC11);
// enable INT0 and INT1 interrupts
EIMSK = (1<<INT0) | (1<<INT1);
#if DBG > 0
// re-use PD4 pin for tracing interrupt times
DDRD |= (1<<DDD4);
#else
// PD4=PCINT20 configuration
// set as input pin with 20k pull-up enabled
PORTD |= (1<<PD4);
//enable pin change interrupt on PCINT20
PCMSK2 |= (1<<PCINT20);
//pin change interrupt enable 2
PCICR |= (1<<PCIE2);
#endif
// analog comparator setup for brown-out detection
// PD7=AIN1 configured by default as input to obtain high impedance
// disable digital input cicuitry on AIN0 and AIN1 pins to reduce leakage current
DIDR1 |= (1<<AIN1D) | (1<<AIN0D);
// comparing AIN1 (Vcc/4.4) to bandgap reference (1.1V)
// bandgap select | AC interrupt enable | AC interrupt on rising edge (DS p.243)
ACSR |= (1<<ACBG) | (1<<ACIE) | (1<<ACIS1) | (1<<ACIS0);
// Timer2 set to CTC mode (DS p.146, 154, 157)
TCCR2A |= 1<<WGM21;
#if DBG > 0
// Toggle pin OC2A=PB3 on compare match
TCCR2A |= 1<<COM2A0;
#endif
// Set PB3 as output pin
DDRB |= (1<<DDB3);
// Timer2 clock prescaler set to 8 => fTOV2 = 1000kHz / 256 / 8 = 488.28Hz (DS p.158)
TCCR2B |= (1<<CS21);
// Enable output compare match interrupt for timer2 (DS p.159)
TIMSK2 |= (1<<OCIE2A);
// Increase sampling frequency to 1250Hz (= 625Hz per channel)
OCR2A = 0x63;
// disable digital input cicuitry on ADCx pins to reduce leakage current
DIDR0 |= (1<<ADC5D) | (1<<ADC4D) | (1<<ADC3D) | (1<<ADC2D) | (1<<ADC1D) | (1<<ADC0D);
// select VBG as reference for ADC
ADMUX |= (1<<REFS1) | (1<<REFS0);
// ADC prescaler set to 8 => 1000kHz / 8 = 125kHz (DS p.258)
ADCSRA |= (1<<ADPS1) | (1<<ADPS0);
// enable ADC and start a first ADC conversion
ADCSRA |= (1<<ADEN) | (1<<ADSC);
//set global interrupt enable in SREG to 1 (DS p.12)
sei();
}
void send(uint8_t msg_type, const struct sensor *measurement, const struct state *aux)
{
uint8_t i;
uint32_t value = 0;
uint32_t ms = 0;
int32_t rest;
uint8_t pulse_count;
char message[60];
switch (msg_type) {
case PULSE:
// blink the green LED
PORTB |= (1<<PB5);
_delay_ms(20);
PORTB &= ~(1<<PB5);
cli();
value = measurement->value;
ms = aux->time;
sei();
strcpy(message, "pls ");
break;
case POWER:
cli();
rest = aux->nano_end - aux->nano_start;
pulse_count = aux->pulse_count_final;
sei();
// Since the AVR has no dedicated floating-point hardware, we need
// to resort to fixed-point calculations for converting nWh/s to W.
// 1W = 10^6/3.6 nWh/s
// value[watt] = 3.6/10^6 * rest[nWh/s]
// value[watt] = 3.6/10^6 * 65536 * (rest[nWh/s] / 65536)
// value[watt] = 3.6/10^6 * 65536 * 262144 / 262144 * (rest[nWh/s] / 65536)
// value[watt] = 61847.53 / 262144 * (rest[nWh/s] / 65536)
// We round the constant down to 61847 to prevent 'underflow' in the
// consecutive else statement.
// The error introduced in the fixed-point rounding equals 8.6*10^-6.
MacU16X16to32(value, (uint16_t)(labs(rest)/65536), 61847);
value /= 262144;
if (rest >= 0)
value += pulse_count*3600;
else
value = pulse_count*3600 - value;
strcpy(message, "pwr ");
break;
}
strcpy(&message[4], measurement->id);
strcpy(&message[36], ":0000000000\n");
i = 46;
do { // generate digits in reverse order
message[i--] = '0' + value % 10; // get next digit
} while ((value /= 10) > 0); // delete it
if ((msg_type == PULSE) && ms) {
strcpy(&message[47], ":0000000000\n");
i = 57;
do { // generate digits in reverse order
message[i--] = '0' + ms % 10; // get next digit
} while ((ms /= 10) > 0); // delete it
}
printString(message);
}
void loop()
{
uint8_t i;
// check whether we have to send out a pls or pwr to the deamon
for (i=0; i<4; i++) {
if (aux[i].pulse == true) {
send(PULSE, (const struct sensor *)&measurements[i], (const struct state *)&aux[i]);
aux[i].pulse = false;
}
if (aux[i].power == true) {
send(POWER, (const struct sensor *)&measurements[i], (const struct state *)&aux[i]);
aux[i].power = false;
}
}
wdt_reset();
}
int main(void)
{
uint8_t i;
WDT_off();
setup();
// insert a startup delay of 20s to prevent interference with redboot
// interrupts are already enabled at this stage
// so the pulses are counted but not sent to the deamon
for (i=0; i<4; i++) _delay_ms(5000);
serialFlush();
printString("\n");
WDT_on();
for (;;) loop();
return 0;
}

145
mote/v1/avr/main.h Normal file
View File

@ -0,0 +1,145 @@
//
// main.h : AVR uC header file for flukso sensor board
// Copyright (c) 2008-2009 jokamajo.org
// Copyright (c) 2010 flukso.net
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// $Id$
//
# define PULSE 0
# define POWER 1
# define WATT 1000000000
# define SECOND 624 // 625Hz - 1
#ifndef SENSOR0
#error "SENSOR0 not defined"
#endif
#ifndef SENSOR1
#error "SENSOR1 not defined"
#endif
#ifndef SENSOR2
#error "SENSOR2 not defined"
#endif
#ifndef SENSOR3
#error "SENSOR3 not defined"
#endif
#ifndef PHASE
#error "PHASE not defined"
#endif
#ifndef METERCONST
#error "METERCONST not defined"
#endif
#ifndef PULSE_CONST_2
#error "PULSE_CONST_2 not defined"
#endif
#ifndef PULSE_HALF_2
#error "PULSE_HALF_2 not defined"
#endif
#ifndef PULSE_CONST_3
#error "PULSE_CONST_3 not defined"
#endif
#ifndef PULSE_HALF_3
#error "PULSE_HALF_3 not defined"
#endif
#ifndef PULSE_CONST_4
#error "PULSE_CONST_4 not defined"
#endif
#ifndef PULSE_HALF_4
#error "PULSE_HALF_4 not defined"
#endif
#define START 0
#define END3 0xffffffff
#define END2 0xeeeeeeee
#define END1 0xdddddddd
#define END0 0xcccccccc
// This macro performs a 16x16 -> 32 unsigned MAC in 37 cycles with operands and results in memory
// based on http://www2.ife.ee.ethz.ch/~roggend/publications/wear/DSPMic_v1.1.pdf par 3.4 and table 31.
#define MacU16X16to32(uint_32Acc, uint_16In1, uint_16In2) \
asm volatile ( \
"clr r2 \n\t" \
"mul %B2, %B1 \n\t" \
"movw r4, r0 \n\t" \
"mul %A2, %A1 \n\t" \
"add %A0, r0 \n\t" \
"adc %B0, r1 \n\t" \
"adc %C0, r4 \n\t" \
"adc %D0, r5 \n\t" \
"mul %B2, %A1 \n\t" \
"add %B0, r0 \n\t" \
"adc %C0, r1 \n\t" \
"adc %D0, r2 \n\t" \
"mul %A2, %B1 \n\t" \
"add %B0, r0 \n\t" \
"adc %C0, r1 \n\t" \
"adc %D0, r2 \n\t" \
"clr r1 \n\t" \
: \
"+r" (uint_32Acc) \
: \
"a" (uint_16In1), \
"a" (uint_16In2) \
: \
"r2", "r4", "r5" \
)
// datastructures
struct time_struct {
boolean skip;
uint32_t ms;
};
struct state {
boolean pulse;
boolean toggle;
boolean half;
uint32_t nano;
uint16_t adc;
boolean power;
uint32_t nano_start;
uint32_t nano_end;
uint8_t pulse_count;
uint8_t pulse_count_final;
uint32_t time;
};
struct sensor {
char id[33];
uint32_t value;
};
// prototypes
void WDT_off(void);
void WDT_on(void);
void pulse_add(volatile struct sensor *measurement, volatile struct state *aux, uint32_t pulse_const, uint32_t pulse_half);
void send(uint8_t msg_type, const struct sensor *measurement, const struct state *aux);

1624
mote/v1/openwrt/.config Normal file

File diff suppressed because it is too large Load Diff

2
mote/v1/openwrt/INSTALL Normal file
View File

@ -0,0 +1,2 @@
To install a customized OpenWRT Backfire build environment for Flukso targets:
./install.sh /path/you/would/like/to/backfire

View File

@ -0,0 +1,14 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Flukso RESTful API on %h</name>
<service>
<type>_flukso._tcp</type>
<port>8080</port>
<txt-record>id1=0123456789abcdef0123456789abcde0</txt-record>
<txt-record>id2=0123456789abcdef0123456789abcde1</txt-record>
<txt-record>id3=0123456789abcdef0123456789abcde2</txt-record>
<txt-record>path=/sensor</txt-record>
<txt-record>version=1.0</txt-record>
</service>
</service-group>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Web Server on %h</name>
<service>
<type>_http._tcp</type>
<port>80</port>
<txt-record>path=/</txt-record>
</service>
</service-group>

View File

@ -0,0 +1,20 @@
config system
option timezone UTC
option hostname flukso
option device 0123456789abcdef0123456789abcdef
option key 00112233445566778899aabbccddeeff
option version 111
config button
option button reset
option action released
option handler net_toggle
option min 2
option max 5
config button
option button reset
option action released
option handler net_defaults
option min 10
option max 30

View File

@ -0,0 +1,83 @@
# Server configuration
config uhttpd main
# HTTP listen addresses, multiple allowed
list listen_http 0.0.0.0:80
# list listen_http [::]:80
# HTTPS listen addresses, multiple allowed
# list listen_https 0.0.0.0:443
# list listen_https [::]:443
# Server document root
option home /www
# Reject requests from RFC1918 IP addresses
# directed to the servers public IP(s).
# This is a DNS rebinding countermeasure.
option rfc1918_filter 1
# Certificate and private key for HTTPS.
# If no listen_https addresses are given,
# the key options are ignored.
option cert /etc/uhttpd.crt
option key /etc/uhttpd.key
# CGI url prefix, will be searched in docroot.
# Default is /cgi-bin
option cgi_prefix /cgi-bin
# List of extension->interpreter mappings.
# Files with an associated interpreter can
# be called outside of the CGI prefix and do
# not need to be executable.
# list interpreter ".php=/usr/bin/php-cgi"
# list interpreter ".cgi=/usr/bin/perl"
# Lua url prefix and handler script.
# Lua support is disabled if no prefix given.
# option lua_prefix /luci
# option lua_handler /usr/lib/lua/luci/sgi/uhttpd.lua
# CGI/Lua timeout, if the called script does not
# write data within the given amount of seconds,
# the server will terminate the request with
# 504 Gateway Timeout response.
option script_timeout 60
# Network timeout, if the current connection is
# blocked for the specified amount of seconds,
# the server will terminate the associated
# request process.
option network_timeout 30
# Basic auth realm, defaults to local hostname
# option realm OpenWrt
# Configuration file in busybox httpd format
# option config /etc/httpd.conf
config uhttpd restful
list listen_http 0.0.0.0:8080
option home /www
option cgi_prefix /sensor
option script_timeout 5
option network_timeout 5
# Certificate defaults for px5g key generator
config cert px5g
# Validity time
option days 730
# RSA key size
option bits 1024
# Location
option country DE
option state Berlin
option location Berlin
# Common name
option commonname OpenWrt

View File

@ -0,0 +1,7 @@
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
# set the wifi led pin (=GPIO 4) direction to output
gpioctl dirout 4
exit 0

View File

@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDfzCCAmegAwIBAgIJANYOkpI6yVcFMA0GCSqGSIb3DQEBBQUAMDMxCzAJBgNV
BAYTAkJFMQ8wDQYDVQQKEwZGbHVrc28xEzARBgNVBAMTCmZsdWtzby5uZXQwHhcN
MTAwNjAxMjE1ODAyWhcNMzUwNTI2MjE1ODAyWjAzMQswCQYDVQQGEwJCRTEPMA0G
A1UEChMGRmx1a3NvMRMwEQYDVQQDEwpmbHVrc28ubmV0MIIBIjANBgkqhkiG9w0B
AQEFAAOCAQ8AMIIBCgKCAQEA6CtNI3YrF/7Ak3etIe+XnL4HwJYki4PyaWI4S7W1
49C9W5AEbEd7ufnsaku3eVxMqOP6b5L7MFpCCGDiM1Zt32yYAcL65eCrofZw1DE0
SuWos0Z1P4y2rIUFHya8g8bUh7lUvq30IBgnnUh7Lo0eQT1XfnC/KMUnvseHI/iw
Y3HhYX+espsCPh1a0ATLlEk93XK99q/5mgojSGQxmwPj/91mOWmJOO4edEQAhK+u
t6wCNxZNnf9yyyzzLczwMytfrwBWJEJjJFTfr3JiEmHdl4dt7UiuElGLMr9dFhPV
12Bidxszov663ffUiIUmV/fkMWF1ZEWXFS0x+VJ52seChwIDAQABo4GVMIGSMB0G
A1UdDgQWBBQGMvERFrapN1lmOm9SVR8qB+uj/zBjBgNVHSMEXDBagBQGMvERFrap
N1lmOm9SVR8qB+uj/6E3pDUwMzELMAkGA1UEBhMCQkUxDzANBgNVBAoTBkZsdWtz
bzETMBEGA1UEAxMKZmx1a3NvLm5ldIIJANYOkpI6yVcFMAwGA1UdEwQFMAMBAf8w
DQYJKoZIhvcNAQEFBQADggEBAOZjgNoNhJLckVMEYZiYWqRDWeRPBkyGStCH93r3
42PpuKDyysxI1ldLTcUpUSrs1AtdSIEiEahWr6zVW4QW4o9iqO905E03aTO86L+P
j7SIBPP01M2f70pHpnz+uH1MDxsarI96qllslWfymYI7c6yUN/VciWfNWa38nK1l
MiQJuDvElNy8aN1JJtXHFUQK/I8ois1ATT1rGAiqrkDZIm4pdDmqB/zLI3qIJf8o
cKIo2x/YkVhuDmIpU/XVA13csXrXU+CLfFyNdY1a/6Dhv2B4wG6J5RGuxWmA+Igg
TTysD+aqqzs8XstqDu/aLjMzFKMaXNvDoCbdFQGVXfx0F1A=
-----END CERTIFICATE-----

View File

@ -0,0 +1,28 @@
kernel.panic=3
net.ipv4.conf.default.arp_ignore=1
net.ipv4.conf.all.arp_ignore=1
net.ipv4.ip_forward=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.icmp_ignore_bogus_error_responses=1
net.ipv4.tcp_ecn=0
net.ipv4.tcp_fin_timeout=30
net.ipv4.tcp_keepalive_time=120
net.ipv4.tcp_syncookies=1
net.ipv4.tcp_timestamps=0
net.core.netdev_max_backlog=30
net.netfilter.nf_conntrack_checksum=0
net.ipv4.netfilter.ip_conntrack_checksum=0
net.ipv4.netfilter.ip_conntrack_max=16384
net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=3600
net.ipv4.netfilter.ip_conntrack_udp_timeout=60
net.ipv4.netfilter.ip_conntrack_udp_timeout_stream=180
# net.ipv6.conf.all.forwarding=1
# disable bridge firewalling by default
net.bridge.bridge-nf-call-arptables=0
net.bridge.bridge-nf-call-ip6tables=0
net.bridge.bridge-nf-call-iptables=0
# blink the wifi led
dev.wifi0.softled=1
dev.wifi0.ledpin=4

38
mote/v1/openwrt/install.sh Executable file
View File

@ -0,0 +1,38 @@
#!/usr/bin/env bash
if (( $# < 1 ))
then
printf "%b" "Error. Not enough arguments.\n"
printf "Usage: ./install <your/desired/path/to/backfire>\n"
exit 1
elif (( $# > 1 ))
then
printf "%b" "Error. Too many arguments.\n"
printf "Usage: ./install <your/desired/path/to/backfire>\n"
exit 2
fi
REPO_PATH=$(pwd)
BACKFIRE_PATH=$1
mkdir -p $BACKFIRE_PATH
svn co svn://svn.openwrt.org/openwrt/branches/backfire $BACKFIRE_PATH
echo "src-link flukso $REPO_PATH/package" > $BACKFIRE_PATH/feeds.conf
$BACKFIRE_PATH/scripts/feeds update
$BACKFIRE_PATH/scripts/feeds install -a -p flukso
cp .config $BACKFIRE_PATH
cp -r files $BACKFIRE_PATH
cp patches/300-set.AR2315_RESET_GPIO.to.6.patch $BACKFIRE_PATH/target/linux/atheros/patches-2.6.30
cp patches/310-hotplug_button_jiffies_calc.patch $BACKFIRE_PATH/target/linux/atheros/patches-2.6.30
cd $BACKFIRE_PATH
patch -p0 < $REPO_PATH/patches/100-disable.console.patch
patch -p0 < $REPO_PATH/patches/110-set.console.baud.to.4800.patch
# and to build the flash image
echo To compile this custom backfire build for Flukso, just type: make -j8
echo Use approx. as many jobs as the number of cores available on your build machine.

View File

@ -0,0 +1,68 @@
10
dir
23175
svn://svn.openwrt.org/openwrt/packages/libs/avahi
svn://svn.openwrt.org/openwrt
2010-09-07T10:04:42.376593Z
22967
mb
3c298f89-4303-0410-b956-a3cf2f4a3e73
files
dir
patches
dir
Makefile
file
2010-09-20T10:21:42.557435Z
14c290979507656ff4cf4d92d02e7945
2010-09-07T10:04:42.376593Z
22967
mb
has-props
5705

View File

@ -0,0 +1,13 @@
K 9
copyright
V 30
Copyright (C) 2006 OpenWrt.org
K 7
licence
V 5
GPLv2
K 13
svn:eol-style
V 6
native
END

View File

@ -0,0 +1,198 @@
#
# Copyright (C) 2007-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=avahi
PKG_VERSION:=0.6.25
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://avahi.org/download/
PKG_MD5SUM:=a83155a6e29e3988f07e5eea3287b21e
PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host
PKG_FIXUP:=libtool
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/avahi/Default
SECTION:=net
CATEGORY:=Network
TITLE:=An mDNS/DNS-SD implementation
URL:=http://www.avahi.org/
endef
define Package/avahi/Default/description
An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library).
Avahi is a system which facilitates service discovery on a local network --
this means that you can plug your laptop or computer into a network and
instantly be able to view other people who you can chat with, find printers
to print to or find files being shared. This kind of technology is already
found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
and is very convenient.
endef
define Package/libavahi
$(call Package/avahi/Default)
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libdaemon +libpthread +libgdbm
TITLE+= (library)
endef
define Package/libavahi/description
$(call Package/avahi/Default/description)
.
This package contains the mDNS/DNS-SD shared libraries, used by other programs.
endef
define Package/avahi-autoipd
$(call Package/avahi/Default)
DEPENDS:=+libdaemon
TITLE:=IPv4LL network address configuration daemon
endef
define Package/avahi-autoipd/description
$(call Package/avahi/Default/description)
.
This package implements IPv4LL, "Dynamic Configuration of IPv4 Link-Local
Addresses" (IETF RFC3927), a protocol for automatic IP address configuration
from the link-local 169.254.0.0/16 range without the need for a central
server. It is primarily intended to be used in ad-hoc networks which lack a
DHCP server.
endef
define Package/avahi-daemon
$(call Package/avahi/Default)
DEPENDS:=+libavahi +libexpat
TITLE+= (daemon)
endef
define Package/avahi-daemon/description
$(call Package/avahi/Default/description)
.
This package contains an mDNS/DNS-SD daemon.
endef
define Package/avahi-daemon/conffiles
/etc/avahi/avahi-daemon.conf
/etc/avahi/services/http.service
/etc/avahi/services/ssh.service
endef
define Package/avahi-dnsconfd
$(call Package/avahi/Default)
DEPENDS:=+libavahi
TITLE:=An Unicast DNS server from mDNS/DNS-SD configuration daemon
endef
define Package/avahi-dnsconfd/description
$(call Package/avahi/Default/description)
.
This package contains an Unicast DNS server from mDNS/DNS-SD configuration
daemon, which may be used to configure conventional DNS servers using mDNS
in a DHCP-like fashion. Especially useful on IPv6.
endef
TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE
CONFIGURE_ARGS+= \
--enable-shared \
--enable-static \
--disable-glib \
--disable-gobject \
--disable-qt3 \
--disable-qt4 \
--disable-gtk \
--disable-dbus \
--with-xml=expat \
--disable-dbm \
--enable-gdbm \
--enable-libdaemon \
--disable-python \
--disable-pygtk \
--disable-python-dbus \
--disable-mono \
--disable-monodoc \
--disable-doxygen-doc \
--disable-doxygen-dot \
--disable-doxygen-man \
--disable-doxygen-rtf \
--disable-doxygen-xml \
--disable-doxygen-chm \
--disable-doxygen-chi \
--disable-doxygen-html \
--disable-doxygen-ps \
--disable-doxygen-pdf \
--disable-xmltoman \
--with-distro=none \
--with-avahi-user=nobody \
--with-avahi-group=nogroup \
--with-autoipd-user=nobody \
--with-autoipd-group=nogroup
ifneq ($(CONFIG_SSP_SUPPORT),y)
CONFIGURE_ARGS+= \
--disable-stack-protector
endif
CONFIGURE_VARS+= \
CFLAGS="$$$$CFLAGS -DNDEBUG" \
define Build/Configure
( cd $(PKG_BUILD_DIR); aclocal; libtoolize; autoreconf; );
$(call Build/Configure/Default)
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-{common,core} $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libavahi/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
endef
define Package/avahi-autoipd/install
$(INSTALL_DIR) $(1)/etc/avahi
$(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/
endef
define Package/avahi-daemon/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/avahi
$(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
$(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
endef
define Package/avahi-dnsconfd/install
$(INSTALL_DIR) $(1)/etc/avahi
$(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,libavahi))
$(eval $(call BuildPackage,avahi-autoipd))
$(eval $(call BuildPackage,avahi-daemon))
$(eval $(call BuildPackage,avahi-dnsconfd))

View File

@ -0,0 +1,198 @@
#
# Copyright (C) 2007-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=avahi
PKG_VERSION:=0.6.25
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://avahi.org/download/
PKG_MD5SUM:=a83155a6e29e3988f07e5eea3287b21e
PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host
PKG_FIXUP:=libtool
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/avahi/Default
SECTION:=net
CATEGORY:=Network
TITLE:=An mDNS/DNS-SD implementation
URL:=http://www.avahi.org/
endef
define Package/avahi/Default/description
An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library).
Avahi is a system which facilitates service discovery on a local network --
this means that you can plug your laptop or computer into a network and
instantly be able to view other people who you can chat with, find printers
to print to or find files being shared. This kind of technology is already
found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
and is very convenient.
endef
define Package/libavahi
$(call Package/avahi/Default)
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libdaemon +libpthread +libgdbm
TITLE+= (library)
endef
define Package/libavahi/description
$(call Package/avahi/Default/description)
.
This package contains the mDNS/DNS-SD shared libraries, used by other programs.
endef
define Package/avahi-autoipd
$(call Package/avahi/Default)
DEPENDS:=+libdaemon
TITLE:=IPv4LL network address configuration daemon
endef
define Package/avahi-autoipd/description
$(call Package/avahi/Default/description)
.
This package implements IPv4LL, "Dynamic Configuration of IPv4 Link-Local
Addresses" (IETF RFC3927), a protocol for automatic IP address configuration
from the link-local 169.254.0.0/16 range without the need for a central
server. It is primarily intended to be used in ad-hoc networks which lack a
DHCP server.
endef
define Package/avahi-daemon
$(call Package/avahi/Default)
DEPENDS:=+libavahi +libexpat
TITLE+= (daemon)
endef
define Package/avahi-daemon/description
$(call Package/avahi/Default/description)
.
This package contains an mDNS/DNS-SD daemon.
endef
define Package/avahi-daemon/conffiles
/etc/avahi/avahi-daemon.conf
/etc/avahi/services/http.service
/etc/avahi/services/ssh.service
endef
define Package/avahi-dnsconfd
$(call Package/avahi/Default)
DEPENDS:=+libavahi
TITLE:=An Unicast DNS server from mDNS/DNS-SD configuration daemon
endef
define Package/avahi-dnsconfd/description
$(call Package/avahi/Default/description)
.
This package contains an Unicast DNS server from mDNS/DNS-SD configuration
daemon, which may be used to configure conventional DNS servers using mDNS
in a DHCP-like fashion. Especially useful on IPv6.
endef
TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE
CONFIGURE_ARGS+= \
--enable-shared \
--enable-static \
--disable-glib \
--disable-gobject \
--disable-qt3 \
--disable-qt4 \
--disable-gtk \
--disable-dbus \
--with-xml=expat \
--disable-dbm \
--enable-gdbm \
--enable-libdaemon \
--disable-python \
--disable-pygtk \
--disable-python-dbus \
--disable-mono \
--disable-monodoc \
--disable-doxygen-doc \
--disable-doxygen-dot \
--disable-doxygen-man \
--disable-doxygen-rtf \
--disable-doxygen-xml \
--disable-doxygen-chm \
--disable-doxygen-chi \
--disable-doxygen-html \
--disable-doxygen-ps \
--disable-doxygen-pdf \
--disable-xmltoman \
--with-distro=none \
--with-avahi-user=nobody \
--with-avahi-group=nogroup \
--with-autoipd-user=nobody \
--with-autoipd-group=nogroup
ifneq ($(CONFIG_SSP_SUPPORT),y)
CONFIGURE_ARGS+= \
--disable-stack-protector
endif
CONFIGURE_VARS+= \
CFLAGS="$$$$CFLAGS -DNDEBUG" \
define Build/Configure
( cd $(PKG_BUILD_DIR); aclocal; libtoolize; autoreconf; );
$(call Build/Configure/Default)
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-{common,core} $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libavahi/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
endef
define Package/avahi-autoipd/install
$(INSTALL_DIR) $(1)/etc/avahi
$(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/
endef
define Package/avahi-daemon/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/avahi
$(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
$(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
endef
define Package/avahi-dnsconfd/install
$(INSTALL_DIR) $(1)/etc/avahi
$(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,libavahi))
$(eval $(call BuildPackage,avahi-autoipd))
$(eval $(call BuildPackage,avahi-daemon))
$(eval $(call BuildPackage,avahi-dnsconfd))

View File

@ -0,0 +1,164 @@
10
dir
23175
svn://svn.openwrt.org/openwrt/packages/libs/avahi/files
svn://svn.openwrt.org/openwrt
2009-04-17T15:22:00.575847Z
15247
nico
3c298f89-4303-0410-b956-a3cf2f4a3e73
avahi-daemon.init
file
2010-07-24T18:00:01.268389Z
80c8607dfee5436effe2fb31ffe35368
2009-04-17T15:22:00.575847Z
15247
nico
has-props
267
service-ssh
file
2010-07-24T18:00:01.268389Z
2a3773d96969b121c3fa0988f9921b8c
2009-04-17T15:22:00.575847Z
15247
nico
has-props
265
avahi-daemon.conf
file
2010-07-24T18:00:01.272389Z
4e760dbb6d6c769316874acd7015537d
2009-04-17T15:22:00.575847Z
15247
nico
has-props
445
service-http
file
2010-07-24T18:00:01.272389Z
cad04c15d78baf565a4277f4dbbb4286
2009-04-17T15:22:00.575847Z
15247
nico
has-props
309

View File

@ -0,0 +1,5 @@
K 13
svn:eol-style
V 6
native
END

View File

@ -0,0 +1,5 @@
K 13
svn:eol-style
V 6
native
END

View File

@ -0,0 +1,5 @@
K 13
svn:eol-style
V 6
native
END

View File

@ -0,0 +1,5 @@
K 13
svn:eol-style
V 6
native
END

View File

@ -0,0 +1,28 @@
[server]
#host-name=foo
#domain-name=local
use-ipv4=yes
use-ipv6=no
check-response-ttl=no
use-iff-running=no
[publish]
publish-addresses=yes
publish-hinfo=yes
publish-workstation=no
publish-domain=yes
#publish-dns-servers=192.168.1.1
#publish-resolv-conf-dns-servers=yes
[reflector]
enable-reflector=no
reflect-ipv=no
[rlimits]
#rlimit-as=
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=30
rlimit-stack=4194304
rlimit-nproc=1

View File

@ -0,0 +1,23 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50
BIN=avahi-daemon
DEFAULT=/etc/default/$BIN
OPTIONS="-D"
RUN_D=/var/run/$BIN
start() {
[ -f $DEFAULT ] && . $DEFAULT
mkdir -p $RUN_D
$BIN $OPTIONS
}
stop() {
$BIN -k
}
reload() {
$BIN -r
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Web Server on %h</name>
<service>
<type>_http._tcp</type>
<port>80</port>
<txt-record>path=/index.html</txt-record>
</service>
</service-group>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Secure Shell on %h</name>
<service>
<type>_ssh._tcp</type>
<port>22</port>
</service>
</service-group>

View File

@ -0,0 +1,28 @@
[server]
#host-name=foo
#domain-name=local
use-ipv4=yes
use-ipv6=no
check-response-ttl=no
use-iff-running=no
[publish]
publish-addresses=yes
publish-hinfo=yes
publish-workstation=no
publish-domain=yes
#publish-dns-servers=192.168.1.1
#publish-resolv-conf-dns-servers=yes
[reflector]
enable-reflector=no
reflect-ipv=no
[rlimits]
#rlimit-as=
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=30
rlimit-stack=4194304
rlimit-nproc=1

View File

@ -0,0 +1,23 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50
BIN=avahi-daemon
DEFAULT=/etc/default/$BIN
OPTIONS="-D"
RUN_D=/var/run/$BIN
start() {
[ -f $DEFAULT ] && . $DEFAULT
mkdir -p $RUN_D
$BIN $OPTIONS
}
stop() {
$BIN -k
}
reload() {
$BIN -r
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Web Server on %h</name>
<service>
<type>_http._tcp</type>
<port>80</port>
<txt-record>path=/index.html</txt-record>
</service>
</service-group>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Secure Shell on %h</name>
<service>
<type>_ssh._tcp</type>
<port>22</port>
</service>
</service-group>

View File

@ -0,0 +1,96 @@
10
dir
23175
svn://svn.openwrt.org/openwrt/packages/libs/avahi/patches
svn://svn.openwrt.org/openwrt
2009-05-04T23:33:02.547929Z
15609
nbd
3c298f89-4303-0410-b956-a3cf2f4a3e73
010-fix-pkgconfig-file.patch
file
2010-07-24T18:00:01.276389Z
9c9025b705ab9e03a6faffc833faf7e6
2009-05-04T23:33:02.547929Z
15609
nbd
24091
020-no_gettext.patch
file
2010-07-24T18:00:01.276389Z
0890226989548cfe5349f7334c2cb49d
2009-05-04T23:33:02.547929Z
15609
nbd
49566

View File

@ -0,0 +1,662 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -63,11 +63,15 @@
#
# This is usually added to MOSTLYCLEANFILES.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -82,10 +86,16 @@
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/common/doxygen.mk \
- $(srcdir)/config.h.in $(top_srcdir)/configure ABOUT-NLS \
- ChangeLog compile config.guess config.rpath config.sub depcomp \
- install-sh ltmain.sh missing py-compile
+ $(srcdir)/Makefile.in $(srcdir)/avahi-client.pc.in \
+ $(srcdir)/avahi-compat-howl.pc.in \
+ $(srcdir)/avahi-compat-libdns_sd.pc.in \
+ $(srcdir)/avahi-core.pc.in $(srcdir)/avahi-glib.pc.in \
+ $(srcdir)/avahi-gobject.pc.in $(srcdir)/avahi-qt3.pc.in \
+ $(srcdir)/avahi-qt4.pc.in $(srcdir)/avahi-ui.pc.in \
+ $(srcdir)/common/doxygen.mk $(srcdir)/config.h.in \
+ $(top_srcdir)/configure ABOUT-NLS ChangeLog compile \
+ config.guess config.rpath config.sub depcomp install-sh \
+ ltmain.sh missing py-compile
@HAVE_QT3_TRUE@am__append_1 = \
@HAVE_QT3_TRUE@ $(srcdir)/avahi-qt/qt-watch.h
@@ -146,30 +156,25 @@
am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
$(top_srcdir)/common/gcc_stack_protect.m4 \
$(top_srcdir)/common/gcc_visibility.m4 \
- $(top_srcdir)/common/libtool.m4 \
- $(top_srcdir)/common/ltoptions.m4 \
- $(top_srcdir)/common/ltsugar.m4 \
- $(top_srcdir)/common/ltversion.m4 \
- $(top_srcdir)/common/lt~obsolete.m4 \
- $(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/common/python.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/common/doxygen.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
+ configure.lineno configure.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = avahi-client.pc avahi-compat-howl.pc \
+ avahi-compat-libdns_sd.pc avahi-core.pc avahi-glib.pc \
+ avahi-gobject.pc avahi-qt3.pc avahi-qt4.pc avahi-ui.pc
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -179,8 +184,6 @@
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
pkgconfigDATA_INSTALL = $(INSTALL_DATA)
DATA = $(pkgconfig_DATA)
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
- distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
@@ -196,7 +199,8 @@
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
-ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -208,8 +212,8 @@
AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
AVAHI_USER = @AVAHI_USER@
AWK = @AWK@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
+BUILD_MANPAGES_FALSE = @BUILD_MANPAGES_FALSE@
+BUILD_MANPAGES_TRUE = @BUILD_MANPAGES_TRUE@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -220,7 +224,6 @@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
DBUS_CFLAGS = @DBUS_CFLAGS@
DBUS_LIBS = @DBUS_LIBS@
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
@@ -228,8 +231,28 @@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
+DX_COND_chi_FALSE = @DX_COND_chi_FALSE@
+DX_COND_chi_TRUE = @DX_COND_chi_TRUE@
+DX_COND_chm_FALSE = @DX_COND_chm_FALSE@
+DX_COND_chm_TRUE = @DX_COND_chm_TRUE@
+DX_COND_doc_FALSE = @DX_COND_doc_FALSE@
+DX_COND_doc_TRUE = @DX_COND_doc_TRUE@
+DX_COND_dot_FALSE = @DX_COND_dot_FALSE@
+DX_COND_dot_TRUE = @DX_COND_dot_TRUE@
+DX_COND_html_FALSE = @DX_COND_html_FALSE@
+DX_COND_html_TRUE = @DX_COND_html_TRUE@
+DX_COND_latex_FALSE = @DX_COND_latex_FALSE@
+DX_COND_latex_TRUE = @DX_COND_latex_TRUE@
+DX_COND_man_FALSE = @DX_COND_man_FALSE@
+DX_COND_man_TRUE = @DX_COND_man_TRUE@
+DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@
+DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@
+DX_COND_ps_FALSE = @DX_COND_ps_FALSE@
+DX_COND_ps_TRUE = @DX_COND_ps_TRUE@
+DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@
+DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@
+DX_COND_xml_FALSE = @DX_COND_xml_FALSE@
+DX_COND_xml_TRUE = @DX_COND_xml_TRUE@
DX_CONFIG = @DX_CONFIG@
DX_DOCDIR = @DX_DOCDIR@
DX_DOT = @DX_DOT@
@@ -253,38 +276,85 @@
DX_PDFLATEX = @DX_PDFLATEX@
DX_PERL = @DX_PERL@
DX_PROJECT = @DX_PROJECT@
+ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ENABLE_AUTOIPD_FALSE = @ENABLE_AUTOIPD_FALSE@
+ENABLE_AUTOIPD_TRUE = @ENABLE_AUTOIPD_TRUE@
+ENABLE_CHROOT_FALSE = @ENABLE_CHROOT_FALSE@
+ENABLE_CHROOT_TRUE = @ENABLE_CHROOT_TRUE@
+ENABLE_COMPAT_HOWL_FALSE = @ENABLE_COMPAT_HOWL_FALSE@
+ENABLE_COMPAT_HOWL_TRUE = @ENABLE_COMPAT_HOWL_TRUE@
+ENABLE_COMPAT_LIBDNS_SD_FALSE = @ENABLE_COMPAT_LIBDNS_SD_FALSE@
+ENABLE_COMPAT_LIBDNS_SD_TRUE = @ENABLE_COMPAT_LIBDNS_SD_TRUE@
+ENABLE_CORE_DOCS_FALSE = @ENABLE_CORE_DOCS_FALSE@
+ENABLE_CORE_DOCS_TRUE = @ENABLE_CORE_DOCS_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
EXEEXT = @EXEEXT@
-FGREP = @FGREP@
+F77 = @F77@
+FFLAGS = @FFLAGS@
GACUTIL = @GACUTIL@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLADE20_CFLAGS = @GLADE20_CFLAGS@
GLADE20_LIBS = @GLADE20_LIBS@
GLIB20_CFLAGS = @GLIB20_CFLAGS@
GLIB20_LIBS = @GLIB20_LIBS@
-GMOFILES = @GMOFILES@
-GMSGFMT = @GMSGFMT@
GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
GOBJECT_LIBS = @GOBJECT_LIBS@
GREP = @GREP@
GTK20_CFLAGS = @GTK20_CFLAGS@
GTK20_LIBS = @GTK20_LIBS@
+HAVE_DBM_FALSE = @HAVE_DBM_FALSE@
+HAVE_DBM_TRUE = @HAVE_DBM_TRUE@
+HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@
+HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@
+HAVE_DLOPEN_FALSE = @HAVE_DLOPEN_FALSE@
+HAVE_DLOPEN_TRUE = @HAVE_DLOPEN_TRUE@
+HAVE_GDBM_FALSE = @HAVE_GDBM_FALSE@
+HAVE_GDBM_TRUE = @HAVE_GDBM_TRUE@
+HAVE_GLIB_FALSE = @HAVE_GLIB_FALSE@
+HAVE_GLIB_TRUE = @HAVE_GLIB_TRUE@
+HAVE_GOBJECT_FALSE = @HAVE_GOBJECT_FALSE@
+HAVE_GOBJECT_TRUE = @HAVE_GOBJECT_TRUE@
+HAVE_GTK_FALSE = @HAVE_GTK_FALSE@
+HAVE_GTK_TRUE = @HAVE_GTK_TRUE@
+HAVE_INOTIFY_FALSE = @HAVE_INOTIFY_FALSE@
+HAVE_INOTIFY_TRUE = @HAVE_INOTIFY_TRUE@
+HAVE_KQUEUE_FALSE = @HAVE_KQUEUE_FALSE@
+HAVE_KQUEUE_TRUE = @HAVE_KQUEUE_TRUE@
+HAVE_LIBDAEMON_FALSE = @HAVE_LIBDAEMON_FALSE@
+HAVE_LIBDAEMON_TRUE = @HAVE_LIBDAEMON_TRUE@
+HAVE_MONODOC_FALSE = @HAVE_MONODOC_FALSE@
+HAVE_MONODOC_TRUE = @HAVE_MONODOC_TRUE@
+HAVE_MONO_FALSE = @HAVE_MONO_FALSE@
+HAVE_MONO_TRUE = @HAVE_MONO_TRUE@
+HAVE_NETLINK_FALSE = @HAVE_NETLINK_FALSE@
+HAVE_NETLINK_TRUE = @HAVE_NETLINK_TRUE@
+HAVE_PF_ROUTE_FALSE = @HAVE_PF_ROUTE_FALSE@
+HAVE_PF_ROUTE_TRUE = @HAVE_PF_ROUTE_TRUE@
+HAVE_PYGTK_FALSE = @HAVE_PYGTK_FALSE@
+HAVE_PYGTK_TRUE = @HAVE_PYGTK_TRUE@
+HAVE_PYTHON_DBUS_FALSE = @HAVE_PYTHON_DBUS_FALSE@
+HAVE_PYTHON_DBUS_TRUE = @HAVE_PYTHON_DBUS_TRUE@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+HAVE_QT3_FALSE = @HAVE_QT3_FALSE@
+HAVE_QT3_TRUE = @HAVE_QT3_TRUE@
+HAVE_QT4_FALSE = @HAVE_QT4_FALSE@
+HAVE_QT4_TRUE = @HAVE_QT4_TRUE@
+HAVE_SYS_FILIO_H_FALSE = @HAVE_SYS_FILIO_H_FALSE@
+HAVE_SYS_FILIO_H_TRUE = @HAVE_SYS_FILIO_H_TRUE@
+HAVE_SYS_SYSCTL_H_FALSE = @HAVE_SYS_SYSCTL_H_FALSE@
+HAVE_SYS_SYSCTL_H_TRUE = @HAVE_SYS_SYSCTL_H_TRUE@
+HAVE_XML_FALSE = @HAVE_XML_FALSE@
+HAVE_XML_TRUE = @HAVE_XML_TRUE@
HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
-INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-LD = @LD@
LDFLAGS = @LDFLAGS@
LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
@@ -301,29 +371,18 @@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MCS = @MCS@
MDASSEMBLER = @MDASSEMBLER@
-MKDIR_P = @MKDIR_P@
-MKINSTALLDIRS = @MKINSTALLDIRS@
MOC_QT3 = @MOC_QT3@
MOC_QT4 = @MOC_QT4@
MONODOCER = @MONODOCER@
MONODOC_CFLAGS = @MONODOC_CFLAGS@
MONODOC_DIR = @MONODOC_DIR@
MONODOC_LIBS = @MONODOC_LIBS@
-MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
-MSGMERGE = @MSGMERGE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -333,10 +392,6 @@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
-POFILES = @POFILES@
-POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -354,20 +409,42 @@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
-USE_NLS = @USE_NLS@
+TARGET_ARCHLINUX_FALSE = @TARGET_ARCHLINUX_FALSE@
+TARGET_ARCHLINUX_TRUE = @TARGET_ARCHLINUX_TRUE@
+TARGET_DARWIN_FALSE = @TARGET_DARWIN_FALSE@
+TARGET_DARWIN_TRUE = @TARGET_DARWIN_TRUE@
+TARGET_DEBIAN_FALSE = @TARGET_DEBIAN_FALSE@
+TARGET_DEBIAN_TRUE = @TARGET_DEBIAN_TRUE@
+TARGET_FEDORA_FALSE = @TARGET_FEDORA_FALSE@
+TARGET_FEDORA_TRUE = @TARGET_FEDORA_TRUE@
+TARGET_FREEBSD_FALSE = @TARGET_FREEBSD_FALSE@
+TARGET_FREEBSD_TRUE = @TARGET_FREEBSD_TRUE@
+TARGET_GENTOO_FALSE = @TARGET_GENTOO_FALSE@
+TARGET_GENTOO_TRUE = @TARGET_GENTOO_TRUE@
+TARGET_LFS_FALSE = @TARGET_LFS_FALSE@
+TARGET_LFS_TRUE = @TARGET_LFS_TRUE@
+TARGET_MANDRIVA_FALSE = @TARGET_MANDRIVA_FALSE@
+TARGET_MANDRIVA_TRUE = @TARGET_MANDRIVA_TRUE@
+TARGET_NETBSD_FALSE = @TARGET_NETBSD_FALSE@
+TARGET_NETBSD_TRUE = @TARGET_NETBSD_TRUE@
+TARGET_SLACKWARE_FALSE = @TARGET_SLACKWARE_FALSE@
+TARGET_SLACKWARE_TRUE = @TARGET_SLACKWARE_TRUE@
+TARGET_SUSE_FALSE = @TARGET_SUSE_FALSE@
+TARGET_SUSE_TRUE = @TARGET_SUSE_TRUE@
+USE_XMLTOMAN_FALSE = @USE_XMLTOMAN_FALSE@
+USE_XMLTOMAN_TRUE = @USE_XMLTOMAN_TRUE@
VERSION = @VERSION@
VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
-XGETTEXT = @XGETTEXT@
XML_CFLAGS = @XML_CFLAGS@
XML_LIBS = @XML_LIBS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -382,7 +459,6 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
-builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -404,7 +480,6 @@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -418,12 +493,8 @@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I common
@DX_COND_doc_TRUE@@DX_COND_html_TRUE@DX_CLEAN_HTML = @DX_DOCDIR@/html
@DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHM = @DX_DOCDIR@/chm
@@ -576,7 +647,7 @@
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+ $(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@@ -589,6 +660,24 @@
distclean-hdr:
-rm -f config.h stamp-h1
+avahi-client.pc: $(top_builddir)/config.status $(srcdir)/avahi-client.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-compat-howl.pc: $(top_builddir)/config.status $(srcdir)/avahi-compat-howl.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-compat-libdns_sd.pc: $(top_builddir)/config.status $(srcdir)/avahi-compat-libdns_sd.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-core.pc: $(top_builddir)/config.status $(srcdir)/avahi-core.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-glib.pc: $(top_builddir)/config.status $(srcdir)/avahi-glib.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-gobject.pc: $(top_builddir)/config.status $(srcdir)/avahi-gobject.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-qt3.pc: $(top_builddir)/config.status $(srcdir)/avahi-qt3.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-qt4.pc: $(top_builddir)/config.status $(srcdir)/avahi-qt4.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-ui.pc: $(top_builddir)/config.status $(srcdir)/avahi-ui.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
@@ -597,10 +686,11 @@
-rm -rf .libs _libs
distclean-libtool:
- -rm -f libtool config.lt
+ -rm -f libtool
+uninstall-info-am:
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
- test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -647,7 +737,8 @@
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
@@ -691,8 +782,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -717,8 +808,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -728,12 +819,13 @@
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
+ here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -748,22 +840,24 @@
distdir: $(DISTFILES)
$(am__remove_distdir)
- test -d $(distdir) || mkdir $(distdir)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
+ mkdir $(distdir)
+ $(mkdir_p) $(distdir)/. $(distdir)/avahi-daemon $(distdir)/common $(distdir)/docs $(distdir)/po
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -777,7 +871,7 @@
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -785,8 +879,6 @@
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
- am__remove_distdir=: \
- am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
@@ -797,7 +889,7 @@
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
@@ -807,10 +899,6 @@
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
-
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
@@ -837,8 +925,6 @@
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
@@ -878,7 +964,7 @@
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@ -903,7 +989,7 @@
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
@@ -954,20 +1040,12 @@
install-data-am: install-pkgconfigDATA
-install-dvi: install-dvi-recursive
-
install-exec-am:
-install-html: install-html-recursive
-
install-info: install-info-recursive
install-man:
-install-pdf: install-pdf-recursive
-
-install-ps: install-ps-recursive
-
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -988,27 +1066,26 @@
ps-am:
-uninstall-am: uninstall-pkgconfigDATA
+uninstall-am: uninstall-info-am uninstall-pkgconfigDATA
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
- install-strip
+uninstall-info: uninstall-info-recursive
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am am--refresh check check-am clean clean-generic \
- clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
- dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-zip \
- distcheck distclean distclean-generic distclean-hdr \
- distclean-libtool distclean-tags distcleancheck distdir \
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-generic clean-libtool clean-recursive \
+ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+ dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-pkgconfigDATA install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-pkgconfigDATA
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-pkgconfigDATA install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-info-am \
+ uninstall-pkgconfigDATA
@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
--- a/configure.ac
+++ b/configure.ac
@@ -1088,6 +1088,15 @@
avahi-autoipd/Makefile
avahi-ui/Makefile
po/Makefile.in
+avahi-client.pc
+avahi-compat-howl.pc
+avahi-compat-libdns_sd.pc
+avahi-core.pc
+avahi-glib.pc
+avahi-gobject.pc
+avahi-qt3.pc
+avahi-qt4.pc
+avahi-ui.pc
])
AC_OUTPUT

View File

@ -0,0 +1,662 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -63,11 +63,15 @@
#
# This is usually added to MOSTLYCLEANFILES.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -82,10 +86,16 @@
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/common/doxygen.mk \
- $(srcdir)/config.h.in $(top_srcdir)/configure ABOUT-NLS \
- ChangeLog compile config.guess config.rpath config.sub depcomp \
- install-sh ltmain.sh missing py-compile
+ $(srcdir)/Makefile.in $(srcdir)/avahi-client.pc.in \
+ $(srcdir)/avahi-compat-howl.pc.in \
+ $(srcdir)/avahi-compat-libdns_sd.pc.in \
+ $(srcdir)/avahi-core.pc.in $(srcdir)/avahi-glib.pc.in \
+ $(srcdir)/avahi-gobject.pc.in $(srcdir)/avahi-qt3.pc.in \
+ $(srcdir)/avahi-qt4.pc.in $(srcdir)/avahi-ui.pc.in \
+ $(srcdir)/common/doxygen.mk $(srcdir)/config.h.in \
+ $(top_srcdir)/configure ABOUT-NLS ChangeLog compile \
+ config.guess config.rpath config.sub depcomp install-sh \
+ ltmain.sh missing py-compile
@HAVE_QT3_TRUE@am__append_1 = \
@HAVE_QT3_TRUE@ $(srcdir)/avahi-qt/qt-watch.h
@@ -146,30 +156,25 @@
am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
$(top_srcdir)/common/gcc_stack_protect.m4 \
$(top_srcdir)/common/gcc_visibility.m4 \
- $(top_srcdir)/common/libtool.m4 \
- $(top_srcdir)/common/ltoptions.m4 \
- $(top_srcdir)/common/ltsugar.m4 \
- $(top_srcdir)/common/ltversion.m4 \
- $(top_srcdir)/common/lt~obsolete.m4 \
- $(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/common/python.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/common/doxygen.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
+ configure.lineno configure.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = avahi-client.pc avahi-compat-howl.pc \
+ avahi-compat-libdns_sd.pc avahi-core.pc avahi-glib.pc \
+ avahi-gobject.pc avahi-qt3.pc avahi-qt4.pc avahi-ui.pc
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -179,8 +184,6 @@
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
pkgconfigDATA_INSTALL = $(INSTALL_DATA)
DATA = $(pkgconfig_DATA)
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
- distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
@@ -196,7 +199,8 @@
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
-ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -208,8 +212,8 @@
AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
AVAHI_USER = @AVAHI_USER@
AWK = @AWK@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
+BUILD_MANPAGES_FALSE = @BUILD_MANPAGES_FALSE@
+BUILD_MANPAGES_TRUE = @BUILD_MANPAGES_TRUE@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -220,7 +224,6 @@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
DBUS_CFLAGS = @DBUS_CFLAGS@
DBUS_LIBS = @DBUS_LIBS@
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
@@ -228,8 +231,28 @@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
+DX_COND_chi_FALSE = @DX_COND_chi_FALSE@
+DX_COND_chi_TRUE = @DX_COND_chi_TRUE@
+DX_COND_chm_FALSE = @DX_COND_chm_FALSE@
+DX_COND_chm_TRUE = @DX_COND_chm_TRUE@
+DX_COND_doc_FALSE = @DX_COND_doc_FALSE@
+DX_COND_doc_TRUE = @DX_COND_doc_TRUE@
+DX_COND_dot_FALSE = @DX_COND_dot_FALSE@
+DX_COND_dot_TRUE = @DX_COND_dot_TRUE@
+DX_COND_html_FALSE = @DX_COND_html_FALSE@
+DX_COND_html_TRUE = @DX_COND_html_TRUE@
+DX_COND_latex_FALSE = @DX_COND_latex_FALSE@
+DX_COND_latex_TRUE = @DX_COND_latex_TRUE@
+DX_COND_man_FALSE = @DX_COND_man_FALSE@
+DX_COND_man_TRUE = @DX_COND_man_TRUE@
+DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@
+DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@
+DX_COND_ps_FALSE = @DX_COND_ps_FALSE@
+DX_COND_ps_TRUE = @DX_COND_ps_TRUE@
+DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@
+DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@
+DX_COND_xml_FALSE = @DX_COND_xml_FALSE@
+DX_COND_xml_TRUE = @DX_COND_xml_TRUE@
DX_CONFIG = @DX_CONFIG@
DX_DOCDIR = @DX_DOCDIR@
DX_DOT = @DX_DOT@
@@ -253,38 +276,85 @@
DX_PDFLATEX = @DX_PDFLATEX@
DX_PERL = @DX_PERL@
DX_PROJECT = @DX_PROJECT@
+ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ENABLE_AUTOIPD_FALSE = @ENABLE_AUTOIPD_FALSE@
+ENABLE_AUTOIPD_TRUE = @ENABLE_AUTOIPD_TRUE@
+ENABLE_CHROOT_FALSE = @ENABLE_CHROOT_FALSE@
+ENABLE_CHROOT_TRUE = @ENABLE_CHROOT_TRUE@
+ENABLE_COMPAT_HOWL_FALSE = @ENABLE_COMPAT_HOWL_FALSE@
+ENABLE_COMPAT_HOWL_TRUE = @ENABLE_COMPAT_HOWL_TRUE@
+ENABLE_COMPAT_LIBDNS_SD_FALSE = @ENABLE_COMPAT_LIBDNS_SD_FALSE@
+ENABLE_COMPAT_LIBDNS_SD_TRUE = @ENABLE_COMPAT_LIBDNS_SD_TRUE@
+ENABLE_CORE_DOCS_FALSE = @ENABLE_CORE_DOCS_FALSE@
+ENABLE_CORE_DOCS_TRUE = @ENABLE_CORE_DOCS_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
EXEEXT = @EXEEXT@
-FGREP = @FGREP@
+F77 = @F77@
+FFLAGS = @FFLAGS@
GACUTIL = @GACUTIL@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLADE20_CFLAGS = @GLADE20_CFLAGS@
GLADE20_LIBS = @GLADE20_LIBS@
GLIB20_CFLAGS = @GLIB20_CFLAGS@
GLIB20_LIBS = @GLIB20_LIBS@
-GMOFILES = @GMOFILES@
-GMSGFMT = @GMSGFMT@
GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
GOBJECT_LIBS = @GOBJECT_LIBS@
GREP = @GREP@
GTK20_CFLAGS = @GTK20_CFLAGS@
GTK20_LIBS = @GTK20_LIBS@
+HAVE_DBM_FALSE = @HAVE_DBM_FALSE@
+HAVE_DBM_TRUE = @HAVE_DBM_TRUE@
+HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@
+HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@
+HAVE_DLOPEN_FALSE = @HAVE_DLOPEN_FALSE@
+HAVE_DLOPEN_TRUE = @HAVE_DLOPEN_TRUE@
+HAVE_GDBM_FALSE = @HAVE_GDBM_FALSE@
+HAVE_GDBM_TRUE = @HAVE_GDBM_TRUE@
+HAVE_GLIB_FALSE = @HAVE_GLIB_FALSE@
+HAVE_GLIB_TRUE = @HAVE_GLIB_TRUE@
+HAVE_GOBJECT_FALSE = @HAVE_GOBJECT_FALSE@
+HAVE_GOBJECT_TRUE = @HAVE_GOBJECT_TRUE@
+HAVE_GTK_FALSE = @HAVE_GTK_FALSE@
+HAVE_GTK_TRUE = @HAVE_GTK_TRUE@
+HAVE_INOTIFY_FALSE = @HAVE_INOTIFY_FALSE@
+HAVE_INOTIFY_TRUE = @HAVE_INOTIFY_TRUE@
+HAVE_KQUEUE_FALSE = @HAVE_KQUEUE_FALSE@
+HAVE_KQUEUE_TRUE = @HAVE_KQUEUE_TRUE@
+HAVE_LIBDAEMON_FALSE = @HAVE_LIBDAEMON_FALSE@
+HAVE_LIBDAEMON_TRUE = @HAVE_LIBDAEMON_TRUE@
+HAVE_MONODOC_FALSE = @HAVE_MONODOC_FALSE@
+HAVE_MONODOC_TRUE = @HAVE_MONODOC_TRUE@
+HAVE_MONO_FALSE = @HAVE_MONO_FALSE@
+HAVE_MONO_TRUE = @HAVE_MONO_TRUE@
+HAVE_NETLINK_FALSE = @HAVE_NETLINK_FALSE@
+HAVE_NETLINK_TRUE = @HAVE_NETLINK_TRUE@
+HAVE_PF_ROUTE_FALSE = @HAVE_PF_ROUTE_FALSE@
+HAVE_PF_ROUTE_TRUE = @HAVE_PF_ROUTE_TRUE@
+HAVE_PYGTK_FALSE = @HAVE_PYGTK_FALSE@
+HAVE_PYGTK_TRUE = @HAVE_PYGTK_TRUE@
+HAVE_PYTHON_DBUS_FALSE = @HAVE_PYTHON_DBUS_FALSE@
+HAVE_PYTHON_DBUS_TRUE = @HAVE_PYTHON_DBUS_TRUE@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+HAVE_QT3_FALSE = @HAVE_QT3_FALSE@
+HAVE_QT3_TRUE = @HAVE_QT3_TRUE@
+HAVE_QT4_FALSE = @HAVE_QT4_FALSE@
+HAVE_QT4_TRUE = @HAVE_QT4_TRUE@
+HAVE_SYS_FILIO_H_FALSE = @HAVE_SYS_FILIO_H_FALSE@
+HAVE_SYS_FILIO_H_TRUE = @HAVE_SYS_FILIO_H_TRUE@
+HAVE_SYS_SYSCTL_H_FALSE = @HAVE_SYS_SYSCTL_H_FALSE@
+HAVE_SYS_SYSCTL_H_TRUE = @HAVE_SYS_SYSCTL_H_TRUE@
+HAVE_XML_FALSE = @HAVE_XML_FALSE@
+HAVE_XML_TRUE = @HAVE_XML_TRUE@
HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
-INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-LD = @LD@
LDFLAGS = @LDFLAGS@
LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
@@ -301,29 +371,18 @@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MCS = @MCS@
MDASSEMBLER = @MDASSEMBLER@
-MKDIR_P = @MKDIR_P@
-MKINSTALLDIRS = @MKINSTALLDIRS@
MOC_QT3 = @MOC_QT3@
MOC_QT4 = @MOC_QT4@
MONODOCER = @MONODOCER@
MONODOC_CFLAGS = @MONODOC_CFLAGS@
MONODOC_DIR = @MONODOC_DIR@
MONODOC_LIBS = @MONODOC_LIBS@
-MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
-MSGMERGE = @MSGMERGE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -333,10 +392,6 @@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
-POFILES = @POFILES@
-POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -354,20 +409,42 @@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
-USE_NLS = @USE_NLS@
+TARGET_ARCHLINUX_FALSE = @TARGET_ARCHLINUX_FALSE@
+TARGET_ARCHLINUX_TRUE = @TARGET_ARCHLINUX_TRUE@
+TARGET_DARWIN_FALSE = @TARGET_DARWIN_FALSE@
+TARGET_DARWIN_TRUE = @TARGET_DARWIN_TRUE@
+TARGET_DEBIAN_FALSE = @TARGET_DEBIAN_FALSE@
+TARGET_DEBIAN_TRUE = @TARGET_DEBIAN_TRUE@
+TARGET_FEDORA_FALSE = @TARGET_FEDORA_FALSE@
+TARGET_FEDORA_TRUE = @TARGET_FEDORA_TRUE@
+TARGET_FREEBSD_FALSE = @TARGET_FREEBSD_FALSE@
+TARGET_FREEBSD_TRUE = @TARGET_FREEBSD_TRUE@
+TARGET_GENTOO_FALSE = @TARGET_GENTOO_FALSE@
+TARGET_GENTOO_TRUE = @TARGET_GENTOO_TRUE@
+TARGET_LFS_FALSE = @TARGET_LFS_FALSE@
+TARGET_LFS_TRUE = @TARGET_LFS_TRUE@
+TARGET_MANDRIVA_FALSE = @TARGET_MANDRIVA_FALSE@
+TARGET_MANDRIVA_TRUE = @TARGET_MANDRIVA_TRUE@
+TARGET_NETBSD_FALSE = @TARGET_NETBSD_FALSE@
+TARGET_NETBSD_TRUE = @TARGET_NETBSD_TRUE@
+TARGET_SLACKWARE_FALSE = @TARGET_SLACKWARE_FALSE@
+TARGET_SLACKWARE_TRUE = @TARGET_SLACKWARE_TRUE@
+TARGET_SUSE_FALSE = @TARGET_SUSE_FALSE@
+TARGET_SUSE_TRUE = @TARGET_SUSE_TRUE@
+USE_XMLTOMAN_FALSE = @USE_XMLTOMAN_FALSE@
+USE_XMLTOMAN_TRUE = @USE_XMLTOMAN_TRUE@
VERSION = @VERSION@
VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
-XGETTEXT = @XGETTEXT@
XML_CFLAGS = @XML_CFLAGS@
XML_LIBS = @XML_LIBS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -382,7 +459,6 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
-builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -404,7 +480,6 @@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -418,12 +493,8 @@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I common
@DX_COND_doc_TRUE@@DX_COND_html_TRUE@DX_CLEAN_HTML = @DX_DOCDIR@/html
@DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHM = @DX_DOCDIR@/chm
@@ -576,7 +647,7 @@
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+ $(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@@ -589,6 +660,24 @@
distclean-hdr:
-rm -f config.h stamp-h1
+avahi-client.pc: $(top_builddir)/config.status $(srcdir)/avahi-client.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-compat-howl.pc: $(top_builddir)/config.status $(srcdir)/avahi-compat-howl.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-compat-libdns_sd.pc: $(top_builddir)/config.status $(srcdir)/avahi-compat-libdns_sd.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-core.pc: $(top_builddir)/config.status $(srcdir)/avahi-core.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-glib.pc: $(top_builddir)/config.status $(srcdir)/avahi-glib.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-gobject.pc: $(top_builddir)/config.status $(srcdir)/avahi-gobject.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-qt3.pc: $(top_builddir)/config.status $(srcdir)/avahi-qt3.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-qt4.pc: $(top_builddir)/config.status $(srcdir)/avahi-qt4.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+avahi-ui.pc: $(top_builddir)/config.status $(srcdir)/avahi-ui.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
@@ -597,10 +686,11 @@
-rm -rf .libs _libs
distclean-libtool:
- -rm -f libtool config.lt
+ -rm -f libtool
+uninstall-info-am:
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
- test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -647,7 +737,8 @@
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
@@ -691,8 +782,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -717,8 +808,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -728,12 +819,13 @@
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
+ here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -748,22 +840,24 @@
distdir: $(DISTFILES)
$(am__remove_distdir)
- test -d $(distdir) || mkdir $(distdir)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
+ mkdir $(distdir)
+ $(mkdir_p) $(distdir)/. $(distdir)/avahi-daemon $(distdir)/common $(distdir)/docs $(distdir)/po
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -777,7 +871,7 @@
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -785,8 +879,6 @@
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
- am__remove_distdir=: \
- am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
@@ -797,7 +889,7 @@
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
@@ -807,10 +899,6 @@
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
-
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
@@ -837,8 +925,6 @@
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
@@ -878,7 +964,7 @@
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@ -903,7 +989,7 @@
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
@@ -954,20 +1040,12 @@
install-data-am: install-pkgconfigDATA
-install-dvi: install-dvi-recursive
-
install-exec-am:
-install-html: install-html-recursive
-
install-info: install-info-recursive
install-man:
-install-pdf: install-pdf-recursive
-
-install-ps: install-ps-recursive
-
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -988,27 +1066,26 @@
ps-am:
-uninstall-am: uninstall-pkgconfigDATA
+uninstall-am: uninstall-info-am uninstall-pkgconfigDATA
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
- install-strip
+uninstall-info: uninstall-info-recursive
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am am--refresh check check-am clean clean-generic \
- clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
- dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-zip \
- distcheck distclean distclean-generic distclean-hdr \
- distclean-libtool distclean-tags distcleancheck distdir \
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-generic clean-libtool clean-recursive \
+ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+ dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-pkgconfigDATA install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-pkgconfigDATA
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-pkgconfigDATA install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-info-am \
+ uninstall-pkgconfigDATA
@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
--- a/configure.ac
+++ b/configure.ac
@@ -1088,6 +1088,15 @@
avahi-autoipd/Makefile
avahi-ui/Makefile
po/Makefile.in
+avahi-client.pc
+avahi-compat-howl.pc
+avahi-compat-libdns_sd.pc
+avahi-core.pc
+avahi-glib.pc
+avahi-gobject.pc
+avahi-qt3.pc
+avahi-qt4.pc
+avahi-ui.pc
])
AC_OUTPUT

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
# Copyright (c) 2010 flukso.net
include $(TOPDIR)/rules.mk
PKG_NAME:=button
PKG_VERSION:=1.0
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/button
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=
TITLE:=Button
endef
define Package/button/description
Helper bash scripts used as a callback for hotplug button events. net_toggle toggles between ethernet and wifi mode. net_defaults reverts all firewall, network and wireless settings to factory defaults.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
endef
define Package/button/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/net_toggle $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/net_defaults $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,button))

View File

@ -0,0 +1,17 @@
#!/bin/sh
# Copyright (c) 2010 flukso.net
cd /rom/etc/config
cp firewall network wireless /etc/config
logger 'returning to firewall, network and wireless defaults'
gpioctl dirout 4
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
do
gpioctl clear 4
gpioctl set 4
done
/etc/init.d/network restart

View File

@ -0,0 +1,47 @@
#!/bin/sh
# Copyright (c) 2010 flukso.net
to_wifi ()
{
uci set firewall.@zone[1].input=REJECT
uci set network.wan.ifname=ath0
uci set network.lan.ifname=eth0
uci set wireless.wifi0.disabled=0
uci set wireless.@wifi-iface[0].network=wan
uci set wireless.@wifi-iface[0].mode=sta
uci commit
logger 'toggled to wifi mode'
}
to_eth ()
{
uci set firewall.@zone[1].input=ACCEPT
uci set network.wan.ifname=eth0
uci set network.lan.ifname=ath0
uci set wireless.wifi0.disabled=1
uci set wireless.@wifi-iface[0].network=lan
uci set wireless.@wifi-iface[0].mode=ap
uci commit
logger 'toggled to eth mode'
}
MODE=$(uci get network.wan.ifname)
if [ $MODE == eth0 ]
then
to_wifi
elif [ $MODE == ath0 ]
then
to_eth
fi
gpioctl dirout 4
for i in 1 2 3 4 5
do
gpioctl clear 4
gpioctl set 4
done
/etc/init.d/network restart

View File

@ -0,0 +1,43 @@
# Copyright (c) 2008 jokamajo.org
# 2010 flukso.net
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=flukso
PKG_VERSION:=1.1
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/flukso
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+liblua-xmlrpc +ntpclient
TITLE:=Flukso - community metering
endef
define Package/flukso/description
This package contains the necessary openwrt files for the Flukso [www.flukso.net] community metering application.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
endef
define Package/flukso/install
$(INSTALL_DIR) $(1)/usr/share/lua/flukso/
$(CP) $(PKG_BUILD_DIR)/{flukso,data,dbg,auth,heartbeat,restful}.lua $(1)/usr/share/lua/flukso/
$(INSTALL_DIR) $(1)/etc/init.d/
$(CP) $(PKG_BUILD_DIR)/flukso.init $(1)/etc/init.d/flukso
$(INSTALL_DIR) $(1)/etc/config/
$(CP) $(PKG_BUILD_DIR)/flukso.uci $(1)/etc/config/flukso
endef
$(eval $(call BuildPackage,flukso))

View File

@ -0,0 +1,104 @@
--
-- data.lua: property and methods for manipulating incoming measurements
-- Copyright (c) 2009 jokamajo.org
-- 2010 flukso.net
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
--
-- $Id$
--
local os, math, table, string =
os, math, table, string
local getfenv, setmetatable, pairs, ipairs =
getfenv, setmetatable, pairs, ipairs
module (...)
local modenv = getfenv() -- module environment
-- private
local function timestamps(T)
local H = {} -- helper table, an indexed array containing all the measurement's timestamps
for timestamp in pairs(T) do H[#H+1] = timestamp end
table.sort(H) -- sort in ascending order, oldest timestamps will be treated first
return H
end
function new()
return setmetatable({}, {__index = modenv})
end
function add(M, meter, timestamp, value)
if not M[meter] then M[meter] = {} end
M[meter][timestamp] = value
end
function clear(M)
for meter in pairs(M) do
M[meter] = nil
end
end
function filter(M, span, offset)
for meter, T in pairs(M) do
local H = timestamps(T)
local i = 2
while not (H[i+1] == nil or H[i] > os.time()-offset) do
if math.floor(H[i-1]/span) == math.floor(H[i]/span) and math.floor(H[i]/span) == math.floor(H[i+1]/span) then
T[H[i]] = nil
table.remove(H, i)
else
i = i+1
end
end
end
end
function truncate(M, cutoff)
for meter, T in pairs(M) do
local H = timestamps(T)
for i = H[1], os.time() - cutoff do
T[i] = nil
end
end
end
function fill(M)
for meter, T in pairs(M) do
local H = timestamps(T)
for i = H[#H]-1, H[1]+1, -1 do
if T[i] == nil or T[i] == '"nan"' then T[i] = T[i+1] end
end
for i = H[#H]+1, os.time() do
T[i] = '"nan"'
end
end
end
function json_encode(M)
local J = {}
for meter, T in pairs(M) do
local H = timestamps(T)
local SB = {'['} -- use a string buffer for building up the JSON string
for k, timestamp in ipairs(H) do
SB[#SB+1] = '[' .. timestamp .. ',' .. T[timestamp] .. '],'
end
SB[#SB] = SB[#SB]:sub(1, -2) -- remove the trialing comma from the last entry
SB[#SB+1] = ']'
J[meter] = table.concat(SB)
end
return J
end

View File

@ -0,0 +1,17 @@
#!/bin/sh /etc/rc.common
# Copyright (c) 2008-2009 jokamajo.org
# $Id$
START=98
start() {
stty 4800 -echo -onlcr < /dev/ttyS0
/usr/share/lua/flukso/flukso.lua >&- 2>&- <&- &
/usr/share/lua/flukso/heartbeat.lua 1 >&- 2>&- <&-
echo -e "$(date '+%M') * * * * /usr/share/lua/flukso/heartbeat.lua 0\n"'*/15 * * * * [ -z "$(ps | grep '\'flukso.lu[a]\'')" ] && reboot' | crontab -
}
stop() {
crontab -r
kill -SIGKILL $(ps | grep 'flukso.lu[a]' | awk '{print $1}')
}

View File

@ -0,0 +1,252 @@
#!/usr/bin/env lua
--
-- flukso.lua: flukso deamon running on openwrt
-- Copyright (c) 2008-2009 jokamajo.org
-- 2010 flukso.net
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
--
-- $Id$
--
require 'posix'
require 'xmlrpc.http'
local data = require 'flukso.data'
local auth = require 'flukso.auth'
local dbg = require 'flukso.dbg'
local uci = require 'luci.model.uci'.cursor()
local param = uci:get_all('flukso', 'main')
function dispatch(e_child, p_child, port, homeEnable, localEnable)
return coroutine.create(function()
local function flash() -- flash the power led for 50ms
os.execute('gpioctl clear 4 > /dev/null')
socket.select(nil, nil, 0.05)
os.execute('gpioctl set 4 > /dev/null')
end
-- open the connection to the syslog deamon, specifying our identity
posix.openlog('flukso')
posix.syslog(30, 'starting the flukso deamon')
posix.syslog(30, 'listening for pulses on ' .. port .. '...')
local pattern = '^(%l+)%s(%x+):(%d+):?(%d*)$'
for line in io.lines(port) do
local command, meter, value, msec = line:match(pattern)
value = tonumber(value or '0')
msec = tonumber(msec or '0')
local length = line:len()
if command == 'pls' and (length == 47 or length == 58) then -- user data
flash()
posix.syslog(30, 'received pulse from ' .. port .. ': ' .. line:sub(5))
if homeEnable == 1 then coroutine.resume(e_child, meter, os.time(), value) end
-- pls includes a msec timestamp so report to p_child as well
if length == 58 and localEnable == 1 then
coroutine.resume(p_child, meter, os.time(), value, msec)
end
elseif command == 'pwr' and length == 47 then -- user data
if localEnable == 1 then coroutine.resume(p_child, meter, os.time(), value) end
elseif command == 'msg' then -- control data
posix.syslog(31, 'received message from ' .. port .. ': ' .. line:sub(5))
else -- error
posix.syslog(27, 'input error on ' .. port .. ': ' .. line)
end
end
posix.syslog(30, 'closing down the flukso deamon')
os.exit(1)
end)
end
function buffer(child, interval)
return coroutine.create(function(meter, timestamp, value, msec)
local measurements = data.new()
local threshold = timestamp + interval
local prev = {}
local function diff(x, y) -- calculates y - x
if y >= x then
return y - x
else -- y wrapped around 32-bit boundary
return 4294967296 - x + y
end
end
while true do
if meter ~= nil then
if not prev[meter] then
prev[meter] = {}
end
if msec then -- we're dealing with a pls xxx:yyy:zzz message so calculate power
-- if msec decreased, just update the value in the table
-- but don't make any calculations since the AVR might have gone through a reset
if prev[meter].msec and msec > prev[meter].msec then
local power = math.floor(diff(prev[meter].value, value) / diff(prev[meter].msec, msec) * 3.6 * 10^6 + 0.5)
prev[meter].value = value
value = power
else
prev[meter].value = value
value = nil
end
prev[meter].msec = msec
end
if timestamp > 1234567890 and timestamp > (prev[meter].timestamp or 0) and value then
measurements:add(meter, timestamp, value)
end
end
if timestamp > threshold and next(measurements) then --checking whether table is not empty
coroutine.resume(child, measurements)
threshold = timestamp + interval
prev[meter].timestamp = timestamp
end
meter, timestamp, value, msec = coroutine.yield()
end
end)
end
function filter(child, span, offset)
return coroutine.create(function(measurements)
while true do
measurements:filter(span, offset)
coroutine.resume(child, measurements)
measurements = coroutine.yield()
end
end)
end
function send(child, home, version, method)
local url = 'http://' .. home .. '/xmlrpc/' .. version
return coroutine.create(function(measurements)
while true do
local auth = auth.new()
auth:load()
auth:hmac(measurements)
local status, ret_or_err, res = pcall(xmlrpc.http.call,
url,
method,
auth,
measurements)
if status then
posix.syslog(30, tostring(res))
if ret_or_err then --successful xmlrpc call
measurements:clear()
end
else
posix.syslog(27, tostring(ret_or_err) .. ' ' .. home .. ' ' .. tostring(res))
end
coroutine.resume(child, measurements)
measurements = coroutine.yield()
end
end)
end
function gc(child)
return coroutine.create(function(measurements)
while true do
posix.syslog(31, tostring(collectgarbage('count')*1024)..' bytes of memory used by Lua before garbage collection cycle')
collectgarbage() -- force a complete garbage collection cycle
posix.syslog(31, tostring(collectgarbage('count')*1024)..' bytes of memory used by Lua after garbage collection cycle')
coroutine.resume(child, measurements)
measurements = coroutine.yield()
end
end)
end
function polish(child, cutoff)
return coroutine.create(function(measurements)
while true do
measurements:fill()
measurements:truncate(cutoff)
coroutine.resume(child, measurements)
measurements = coroutine.yield()
end
end)
end
function publish(child, path)
return coroutine.create(function(measurements)
os.execute('mkdir -p ' .. path .. ' > /dev/null')
while true do
local measurements_json = measurements:json_encode()
for meter, json in pairs(measurements_json) do
io.output(path .. '/' .. meter)
io.write(json)
io.close()
end
coroutine.resume(child, measurements)
measurements = coroutine.yield()
end
end)
end
function debug(child, debug)
return coroutine.create(function(measurements)
while true do
if debug == 1 then dbg.vardump(measurements) end
if child then coroutine.resume(child, measurements) end
measurements = coroutine.yield()
end
end)
end
-- dispatch: listen to the serial port for incoming pulses
-- buffer: buffer the pulses in a measurement object
-- filter: sweep recursively to filter all redundant entries
-- send: report the measurements to the server via xmlrpc
-- gc: perform a full garbage collection cycle
-- debug: dump measurements table to stdout
local e_chain = buffer(
filter(
filter(
filter(
send(
gc(
debug(nil, tonumber(param.debug) or 0)
)
, param.home, param.homeVersion, 'logger.measurementAdd')
, 86400, 172800)
, 900, 7200)
, 60, 0)
, tonumber(param.homeInterval) or 300)
local p_chain = buffer(
polish(
publish(
debug(nil, tonumber(param.debug) or 0)
, param.localDir or '/tmp/sensor')
, 60)
, tonumber(param.localInterval) or 0)
local chain = dispatch(e_chain, p_chain, param.port or '/dev/ttyS0', tonumber(param.homeEnable) or 1, tonumber(param.localEnable) or 1)
coroutine.resume(chain)

View File

@ -0,0 +1,40 @@
config flukso main
option port /dev/ttyS0
option home logger.flukso.net
option homeVersion 1
option homeInterval 300
option homeEnable 1
option localDir /tmp/sensor
option localVersion 1.0
option localInterval 0
option localEnable 1
option debug 0
### sensor config options
# config sensor <1..6>
# option id <uuid>
# option input <analog|pulse>
# list port <1..6>
# option constant [<meterconstant>]
# option voltage [<volts>]
# option current [<amps>]
config sensor 1
option id 0123456789abcdef0123456789abcde0
option input analog
list port 1
option voltage 230
option current 50
config sensor 2
option id 0123456789abcdef0123456789abcde1
option input analog
list port 2
option voltage 230
option current 50
config sensor 3
option id 0123456789abcdef0123456789abcde2
option input pulse
list port 3
option constant 1

View File

@ -0,0 +1,88 @@
#!/usr/bin/env lua
--
-- Lua 5.1 heartbeat script running on openwrt
-- Copyright (c) 2008-2009 jokamajo.org
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
--
-- $Id$
--
if not arg[1] then
print ('Please pass the reset argument as a boolean to the script.')
else
-- load libraries
require 'posix'
require 'xmlrpc.http'
require 'luci.sys'
local auth = require 'flukso.auth'
local dbg = require 'flukso.dbg'
local uci = require 'luci.model.uci'.cursor()
local param = uci:get_all('flukso', 'main')
local monitor = {reset = tonumber(arg[1])}
-- open the connection to the syslog deamon, specifying our identity
posix.openlog('heartbeat')
-- calculate hmac and collect relevant monitoring points
local auth = auth.new()
auth:load()
monitor.version = tonumber(auth.version)
monitor.uptime = math.floor(luci.sys.uptime())
monitor.uart_oe = string.match(luci.sys.exec('cat /proc/tty/driver/serial'), 'oe:(%d+)') or 0
system, model, monitor.memtotal, monitor.memcached, monitor.membuffers, monitor.memfree = luci.sys.sysinfo()
auth:hmac(monitor)
dbg.vardump(auth)
dbg.vardump(monitor)
-- send a heartbeat method call
local url = 'http://' .. param.home .. '/xmlrpc/' .. param.homeVersion
local pcall_ok, return_or_err, pong = pcall(xmlrpc.http.call,
url,
'logger.heartbeat',
auth,
monitor)
dbg.vardump(pong)
if pcall_ok and return_or_err then
auth:load()
auth:hmac(pong.upgrade, pong.timestamp)
if auth.signature == pong.signature and pong.timestamp > os.time() - 300 then
posix.syslog(31, 'successful heartbeat authentication')
if tonumber(pong.upgrade) == monitor.version then --reset device
os.execute('reboot')
elseif tonumber(pong.upgrade) > monitor.version then -- upgrade device to specified version
os.execute('wget -P /tmp http://'.. param.home ..'/files/upgrade/upgrade.'..pong.upgrade)
os.execute('chmod a+x /tmp/upgrade.'..pong.upgrade)
os.execute('/tmp/upgrade.'..pong.upgrade)
os.execute('rm /tmp/upgrade.'..pong.upgrade)
end
end
else
posix.syslog(11, tostring(return_or_err))
end
-- close the connection to the syslog deamon
posix.closelog()
end

View File

@ -0,0 +1,68 @@
#!/usr/bin/env lua
--[[
restful.lua - CGI script providing a local RESTful API on the Fluksometer.
Copyright (c) 2010 Bart Van Der Meerssche <bart.vandermeerssche@flukso.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]--
--- Decode a URL's query string
-- @param QS the to-be-decoded query string (optional)
-- @return table containing [name] = value pairs
local function query_decode(QS)
local param = {}
for name, value in (QS or os.getenv("QUERY_STRING")):gmatch("([^&=]+)=([^&=]+)") do
param[name] = value
end
return param
end
--- Fetch the sensor id in the HTTP request.
-- @return sensor id
local function sensor_id()
return os.getenv("SCRIPT_NAME"):match("/sensor/([%x]+)")
end
local param = query_decode()
local path = "/tmp/sensor/"
local version = "1.0"
-- Hardcoding path and version parameters lowers GET response time from 200ms to 90ms.
-- local uci = require "luci.model.uci".cursor()
-- local path = uci:get("flukso", "main", "localDir") .. "/"
-- local version = uci:get("flukso", "main", "localVersion")
if param.interval == "minute" and param.unit == "watt" and param.version == version then
local pre, post = "", ""
if param.jsonp_callback then
pre, post = param.jsonp_callback .. "(", ")"
end
io.input(path .. sensor_id())
io.write("Content-Type: application/json", "\n\n")
io.write(pre, io.read("*all"), post)
else
io.write("status: 400 Bad Request", "\n\n")
io.write("Malformed query string: interval, unit and version query parameters are required.")
end

View File

@ -0,0 +1,62 @@
10
dir
23175
svn://svn.openwrt.org/openwrt/packages/libs/gdbm
svn://svn.openwrt.org/openwrt
2010-09-07T10:04:42.376593Z
22967
mb
3c298f89-4303-0410-b956-a3cf2f4a3e73
Makefile
file
2010-09-20T10:21:42.949435Z
d0da7a248f1fcfd4267cb9a186117fcd
2010-09-07T10:04:42.376593Z
22967
mb
has-props
1196

View File

@ -0,0 +1,13 @@
K 9
copyright
V 30
Copyright (C) 2006 OpenWrt.org
K 7
licence
V 5
GPLv2
K 13
svn:eol-style
V 6
native
END

View File

@ -0,0 +1,56 @@
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=gdbm
PKG_VERSION:=1.8.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/gdbm
PKG_MD5SUM:=1d1b1d5c0245b1c00aff92da751e9aa1
PKG_FIXUP:=libtool
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libgdbm
SECTION:=libs
CATEGORY:=Libraries
TITLE:=GNU database manager
URL:=http://www.gnu.org/software/gdbm/
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
define Build/Compile
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
BINOWN=`id -u` \
BINGRP=`id -g` \
INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
all install
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/gdbm.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgdbm.{a,so*} $(1)/usr/lib/
endef
define Package/libgdbm/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgdbm.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libgdbm))

View File

@ -0,0 +1,56 @@
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=gdbm
PKG_VERSION:=1.8.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/gdbm
PKG_MD5SUM:=1d1b1d5c0245b1c00aff92da751e9aa1
PKG_FIXUP:=libtool
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libgdbm
SECTION:=libs
CATEGORY:=Libraries
TITLE:=GNU database manager
URL:=http://www.gnu.org/software/gdbm/
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
define Build/Compile
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
BINOWN=`id -u` \
BINGRP=`id -g` \
INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
all install
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/gdbm.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgdbm.{a,so*} $(1)/usr/lib/
endef
define Package/libgdbm/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgdbm.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libgdbm))

View File

@ -0,0 +1,62 @@
10
dir
23175
svn://svn.openwrt.org/openwrt/packages/libs/intltool
svn://svn.openwrt.org/openwrt
2009-09-02T22:39:37.037000Z
17487
nbd
3c298f89-4303-0410-b956-a3cf2f4a3e73
Makefile
file
2010-07-24T18:00:01.908389Z
9c7ebffb0a121ebb11dd06ac4ed58b63
2009-09-02T22:39:37.037000Z
17487
nbd
932

View File

@ -0,0 +1,38 @@
#
# Copyright (C) 2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=intltool
PKG_LIBVER:=0.40
PKG_VERSION:=$(PKG_LIBVER).6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@GNOME/intltool/$(PKG_LIBVER)
PKG_MD5SUM:=69bc0353323112f42ad4f9cf351bc3e5
PKG_HOST_ONLY:=1
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/intltool
SECTION:=libs
CATEGORY:=Libraries
TITLE:=set of tools to centralize translation using GNU gettext
URL:=http://www.freedesktop.org/wiki/Software/intltool
BUILDONLY:=1
endef
define Package/intltool/description
intltool is a set of tools to centralize translation of many different
file formats using GNU gettext-compatible PO files.
endef
$(eval $(call BuildPackage,intltool))
$(eval $(call HostBuild))

View File

@ -0,0 +1,38 @@
#
# Copyright (C) 2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=intltool
PKG_LIBVER:=0.40
PKG_VERSION:=$(PKG_LIBVER).6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@GNOME/intltool/$(PKG_LIBVER)
PKG_MD5SUM:=69bc0353323112f42ad4f9cf351bc3e5
PKG_HOST_ONLY:=1
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/intltool
SECTION:=libs
CATEGORY:=Libraries
TITLE:=set of tools to centralize translation using GNU gettext
URL:=http://www.freedesktop.org/wiki/Software/intltool
BUILDONLY:=1
endef
define Package/intltool/description
intltool is a set of tools to centralize translation of many different
file formats using GNU gettext-compatible PO files.
endef
$(eval $(call BuildPackage,intltool))
$(eval $(call HostBuild))

View File

@ -0,0 +1,62 @@
10
dir
23175
svn://svn.openwrt.org/openwrt/packages/libs/libdaemon
svn://svn.openwrt.org/openwrt
2010-02-19T00:14:01.403483Z
19714
lars
3c298f89-4303-0410-b956-a3cf2f4a3e73
Makefile
file
2010-07-24T18:00:01.296389Z
5f6d7f184f93f891e8ba2df99cd102ec
2010-02-19T00:14:01.403483Z
19714
lars
has-props
2051

View File

@ -0,0 +1,13 @@
K 9
copyright
V 30
Copyright (C) 2006 OpenWrt.org
K 7
licence
V 5
GPLv2
K 13
svn:eol-style
V 6
native
END

View File

@ -0,0 +1,68 @@
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libdaemon
PKG_VERSION:=0.14
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://0pointer.de/lennart/projects/libdaemon/
PKG_MD5SUM:=509dc27107c21bcd9fbf2f95f5669563
PKG_FIXUP:=libtool
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libdaemon
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A lightweight C library that eases the writing of UNIX daemons
URL:=http://0pointer.de/lennart/projects/libdaemon/
endef
define Package/libdaemon/description
libdaemon is a lightweight C library that eases the writing of UNIX daemons.
It consists of the following parts:
- A wrapper around fork() which does the correct daemonization procedure of a process
- A wrapper around syslog() for simpler and compatible log output to Syslog or STDERR
- An API for writing PID files
- An API for serializing UNIX signals into a pipe for usage with select() or poll()
- An API for running subprocesses with STDOUT and STDERR redirected to syslog
APIs like these are used in most daemon software available. It is not that
simple to get it done right and code duplication is not a goal.
endef
define Build/Configure
$(call Build/Configure/Default, \
--enable-shared \
--enable-static \
--disable-lynx \
)
endef
TARGET_CFLAGS += $(FPIC)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libdaemon $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.a $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdaemon.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libdaemon/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libdaemon))

View File

@ -0,0 +1,68 @@
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libdaemon
PKG_VERSION:=0.14
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://0pointer.de/lennart/projects/libdaemon/
PKG_MD5SUM:=509dc27107c21bcd9fbf2f95f5669563
PKG_FIXUP:=libtool
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libdaemon
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A lightweight C library that eases the writing of UNIX daemons
URL:=http://0pointer.de/lennart/projects/libdaemon/
endef
define Package/libdaemon/description
libdaemon is a lightweight C library that eases the writing of UNIX daemons.
It consists of the following parts:
- A wrapper around fork() which does the correct daemonization procedure of a process
- A wrapper around syslog() for simpler and compatible log output to Syslog or STDERR
- An API for writing PID files
- An API for serializing UNIX signals into a pipe for usage with select() or poll()
- An API for running subprocesses with STDOUT and STDERR redirected to syslog
APIs like these are used in most daemon software available. It is not that
simple to get it done right and code duplication is not a goal.
endef
define Build/Configure
$(call Build/Configure/Default, \
--enable-shared \
--enable-static \
--disable-lynx \
)
endef
TARGET_CFLAGS += $(FPIC)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libdaemon $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.a $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdaemon.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libdaemon/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libdaemon))

View File

@ -0,0 +1,93 @@
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id: Makefile 6994 2007-04-18 00:46:40Z nico $
include $(TOPDIR)/rules.mk
PKG_NAME:=luaexpat
PKG_VERSION:=1.0.2
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/1506/
PKG_MD5SUM:=e99892c4b6b879ae649a491a07c3bed6
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(INCLUDE_DIR)/package.mk
define Package/liblua-expat
SECTION:=lang
SUBMENU:=LUA
CATEGORY:=Languages
TITLE:=luaexpat library for the LUA programming language
URL:=http://www.luaforge.net/projects/luaexpat
DEPENDS:=+liblua +libexpat
endef
define Package/liblua-expat/description
This package contains the luaexpat library, a binding for the expat XML parser for lua.
endef
define Build/Configure
endef
define Build/Compile
cd $(PKG_BUILD_DIR)/ && \
$(TARGET_CROSS)gcc -shared -o luaexpat.so src/lxplib.c -Wall -fPIC --std=c99 \
$(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) \
$(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
-I$(STAGING_DIR)/usr/include \
-lexpat -llua -lm -ldl &&\
$(TARGET_CROSS)strip luaexpat.so &&\
$(TARGET_CROSS)gcc -c src/lxplib.c -Wall --std=c99 \
$(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) \
$(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
-I$(STAGING_DIR)/usr/include &&\
$(TARGET_CROSS)ar r liblua-expat.a lxplib.o
endef
define Build/InstallDev
mkdir -p $(STAGING_DIR)/usr/include
mkdir -p $(STAGING_DIR)/usr/lib/lua
mkdir -p $(STAGING_DIR)/usr/share/lua/lxp
$(CP) $(PKG_BUILD_DIR)/src/lxplib.h $(STAGING_DIR)/usr/include
$(CP) $(PKG_BUILD_DIR)/src/lxp/lom.lua $(STAGING_DIR)/usr/share/lua/lxp/
$(CP) $(PKG_BUILD_DIR)/luaexpat.so \
$(STAGING_DIR)/usr/lib/liblua-expat.so.0.0.0
cd $(STAGING_DIR)/usr/lib/ && \
ln -fs liblua-expat.so.0.0.0 liblua-expat.so
cd $(STAGING_DIR)/usr/lib/ && \
ln -fs liblua-expat.so.0.0.0 liblua-expat.so.0
cd $(STAGING_DIR)/usr/lib/lua/ && \
ln -fs ../liblua-expat.so.0.0.0 lxp.so
$(CP) $(PKG_BUILD_DIR)/liblua-expat.a $(STAGING_DIR)/usr/lib
endef
define Build/UninstallDev
$(RM) -f $(STAGING_DIR)/usr/include/lxplib.h
$(RM) -f $(STAGING_DIR)/usr/lib/liblua-expat.so.0.0.0
$(RM) -f $(STAGING_DIR)/usr/lib/liblua-expat.so.0
$(RM) -f $(STAGING_DIR)/usr/lib/liblua-expat.a
$(RM) -f $(STAGING_DIR)/usr/lib/lua/lxp.so
$(RM) -rf $(STAGING_DIR)/usr/share/lua/lxp/
endef
define Package/liblua-expat/install
$(INSTALL_DIR) $(1)/usr/lib/lua
$(INSTALL_DIR) $(1)/usr/share/lua/lxp
$(CP) $(PKG_BUILD_DIR)/luaexpat.so \
$(1)/usr/lib/liblua-expat.so.0.0.0
cd $(1)/usr/lib/lua/ && \
ln -fs ../liblua-expat.so.0.0.0 lxp.so
cd $(1)/usr/lib/ && ln -sf liblua-expat.so.0.0.0 liblua-expat.so
$(CP) $(PKG_BUILD_DIR)/src/lxp/lom.lua $(1)/usr/share/lua/lxp/
endef
$(eval $(call BuildPackage,liblua-expat))

View File

@ -0,0 +1,62 @@
10
dir
23099
svn://svn.openwrt.org/openwrt/packages/lang/luasocket
svn://svn.openwrt.org/openwrt
2010-01-16T07:31:48.653263Z
19165
cshore
3c298f89-4303-0410-b956-a3cf2f4a3e73
Makefile
file
2010-07-24T17:59:55.636389Z
b55d5b7ed4e40bacfc351c24d0e0895d
2010-01-16T07:31:48.653263Z
19165
cshore
1634

View File

@ -0,0 +1,59 @@
#
# Copyright (C) 2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luasocket
PKG_VERSION:=2.0.2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/2664
PKG_MD5SUM:=41445b138deb7bcfe97bff957503da8e
include $(INCLUDE_DIR)/package.mk
define Package/luasocket
SUBMENU:=Lua
SECTION:=lang
CATEGORY:=Languages
TITLE:=LuaSocket
URL:=http://luasocket.luaforge.net/
DEPENDS:=+lua
endef
define Package/luasocket/description
LuaSocket is the most comprehensive networking support
library for the Lua language. It provides easy access to
TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more.
endef
define Build/Configure
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/ \
LIBDIR="$(TARGET_LDFLAGS)" \
CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
LD="$(TARGET_CROSS)ld -shared" \
all
endef
define Package/luasocket/install
$(INSTALL_DIR) $(1)/usr/lib/lua
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime.so.1.0.2 $(1)/usr/lib/lua
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket.so.2.0.2 $(1)/usr/lib/lua
$(INSTALL_DIR) $(1)/usr/lib/lua/mime
ln -sf ../mime.so.1.0.2 $(1)/usr/lib/lua/mime/core.so
$(INSTALL_DIR) $(1)/usr/lib/lua/socket
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url}.lua $(1)/usr/lib/lua/socket
ln -sf ../socket.so.2.0.2 $(1)/usr/lib/lua/socket/core.so
endef
$(eval $(call BuildPackage,luasocket))

View File

@ -0,0 +1,59 @@
#
# Copyright (C) 2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luasocket
PKG_VERSION:=2.0.2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/2664
PKG_MD5SUM:=41445b138deb7bcfe97bff957503da8e
include $(INCLUDE_DIR)/package.mk
define Package/luasocket
SUBMENU:=Lua
SECTION:=lang
CATEGORY:=Languages
TITLE:=LuaSocket
URL:=http://luasocket.luaforge.net/
DEPENDS:=+lua
endef
define Package/luasocket/description
LuaSocket is the most comprehensive networking support
library for the Lua language. It provides easy access to
TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more.
endef
define Build/Configure
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/ \
LIBDIR="$(TARGET_LDFLAGS)" \
CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
LD="$(TARGET_CROSS)ld -shared" \
all
endef
define Package/luasocket/install
$(INSTALL_DIR) $(1)/usr/lib/lua
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime.so.1.0.2 $(1)/usr/lib/lua
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket.so.2.0.2 $(1)/usr/lib/lua
$(INSTALL_DIR) $(1)/usr/lib/lua/mime
ln -sf ../mime.so.1.0.2 $(1)/usr/lib/lua/mime/core.so
$(INSTALL_DIR) $(1)/usr/lib/lua/socket
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url}.lua $(1)/usr/lib/lua/socket
ln -sf ../socket.so.2.0.2 $(1)/usr/lib/lua/socket/core.so
endef
$(eval $(call BuildPackage,luasocket))

View File

@ -0,0 +1,43 @@
include $(TOPDIR)/rules.mk
PKG_BRANCH:=trunk
PKG_NAME:=luaxyssl
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://luaxyssl.googlecode.com/svn/$(PKG_BRANCH)
PKG_REV:=65
PKG_VERSION:=0.2+svn$(PKG_REV)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
PKG_SOURCE_PROTO:=svn
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(INCLUDE_DIR)/package.mk
define Package/luaxyssl
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=LUA
TITLE:=xyssl-Bindings for Lua
URL:=http://code.google.com/p/luaxyssl
DEPENDS:=+liblua +libxyssl
endef
define Build/Configure
endef
define Build/Compile
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -shared -fpic -pedantic -Wall -std=c99 \
-I$(STAGING_DIR)/usr/include \
-DXYSSL=9 \
-o $(PKG_BUILD_DIR)/lxyssl.so -lxyssl $(PKG_BUILD_DIR)/lxyssl.c
endef
define Package/luaxyssl/install
$(INSTALL_DIR) $(1)/usr/lib/lua
$(INSTALL_DATA) $(PKG_BUILD_DIR)/lxyssl.so $(1)/usr/lib/lua
endef
$(eval $(call BuildPackage,luaxyssl))

View File

@ -0,0 +1,59 @@
K 25
svn:wc:ra_dav:version-url
V 37
/!svn/ver/6189/luci/branches/luci-0.9
END
NOTICE
K 25
svn:wc:ra_dav:version-url
V 44
/!svn/ver/4830/luci/branches/luci-0.9/NOTICE
END
LICENSE
K 25
svn:wc:ra_dav:version-url
V 45
/!svn/ver/4830/luci/branches/luci-0.9/LICENSE
END
THANKYOU
K 25
svn:wc:ra_dav:version-url
V 46
/!svn/ver/4830/luci/branches/luci-0.9/THANKYOU
END
.project
K 25
svn:wc:ra_dav:version-url
V 46
/!svn/ver/4830/luci/branches/luci-0.9/.project
END
.gitignore
K 25
svn:wc:ra_dav:version-url
V 48
/!svn/ver/4830/luci/branches/luci-0.9/.gitignore
END
INSTALL
K 25
svn:wc:ra_dav:version-url
V 45
/!svn/ver/4830/luci/branches/luci-0.9/INSTALL
END
.cproject
K 25
svn:wc:ra_dav:version-url
V 47
/!svn/ver/4830/luci/branches/luci-0.9/.cproject
END
.buildpath
K 25
svn:wc:ra_dav:version-url
V 48
/!svn/ver/4830/luci/branches/luci-0.9/.buildpath
END
Makefile
K 25
svn:wc:ra_dav:version-url
V 46
/!svn/ver/6029/luci/branches/luci-0.9/Makefile
END

Some files were not shown because too many files have changed in this diff Show More