mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-13 19:13:41 +00:00
PKGBUILD
This commit is contained in:
16
.bumpversion.cfg
Normal file
16
.bumpversion.cfg
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
[bumpversion]
|
||||||
|
commit = True
|
||||||
|
tag = True
|
||||||
|
current_version = 0.1
|
||||||
|
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?)?
|
||||||
|
serialize =
|
||||||
|
{major}.{minor}
|
||||||
|
|
||||||
|
[bumpversion:file:src/config.h]
|
||||||
|
search = VERSION "{current_version}"
|
||||||
|
replace = VERSION "{new_version}"
|
||||||
|
|
||||||
|
[bumpversion:file:PKGBUILD]
|
||||||
|
search = pkgver={current_version}
|
||||||
|
replace = pkgver={new_version}
|
||||||
|
|
||||||
24
Makefile
24
Makefile
@@ -1,10 +1,11 @@
|
|||||||
DESTDIR ?=
|
DESTDIR ?=
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
|
CFLAGS ?= -O3
|
||||||
|
LDFLAGS ?=
|
||||||
|
|
||||||
LIBS = -lm -ljpeg -pthread -levent -levent_pthreads
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -c -std=c99 -O3 -Wall -Wextra -D_GNU_SOURCE
|
LIBS = -lm -ljpeg -pthread -levent -levent_pthreads
|
||||||
LDFLAGS =
|
CFLAGS += -c -std=c99 -Wall -Wextra -D_GNU_SOURCE
|
||||||
SOURCES = $(shell ls src/*.c src/jpeg/*.c)
|
SOURCES = $(shell ls src/*.c src/jpeg/*.c)
|
||||||
OBJECTS = $(SOURCES:.c=.o)
|
OBJECTS = $(SOURCES:.c=.o)
|
||||||
PROG = ustreamer
|
PROG = ustreamer
|
||||||
@@ -36,5 +37,22 @@ $(PROG): $(OBJECTS)
|
|||||||
$(CC) $(LIBS) $(CFLAGS) $< -o $@
|
$(CC) $(LIBS) $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
|
|
||||||
|
release:
|
||||||
|
make clean
|
||||||
|
make push
|
||||||
|
make bump
|
||||||
|
make push
|
||||||
|
make clean
|
||||||
|
|
||||||
|
|
||||||
|
bump:
|
||||||
|
bumpversion minor
|
||||||
|
|
||||||
|
|
||||||
|
push:
|
||||||
|
git push
|
||||||
|
git push --tags
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f src/*.o src/{jpeg,omx}/*.o vgcore.* $(PROG)
|
rm -f src/*.o src/{jpeg,omx}/*.o vgcore.* $(PROG)
|
||||||
|
|||||||
30
PKGBUILD
Normal file
30
PKGBUILD
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# Contributor: Maxim Devaev <mdevaev@gmail.com>
|
||||||
|
# Author: Maxim Devaev <mdevaev@gmail.com>
|
||||||
|
|
||||||
|
|
||||||
|
pkgname=ustreamer
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Lightweight and fast MJPG-HTTP streamer"
|
||||||
|
url="https://github.com/pi-kvm/ustreamer"
|
||||||
|
license=(GPL)
|
||||||
|
arch=(i686 x86_64 armv6h armv7h)
|
||||||
|
depends=(libjpeg libevent)
|
||||||
|
# optional: raspberrypi-firmware for OMX JPEG compressor
|
||||||
|
makedepends=(gcc make)
|
||||||
|
source=("$url/archive/v$pkgver.tar.gz")
|
||||||
|
md5sums=(SKIP)
|
||||||
|
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd $srcdir
|
||||||
|
rm -rf $pkgname-build
|
||||||
|
cp -r pi-kvm-$pkgver/ustreamer $pkgname-build
|
||||||
|
cd $pkgname-build
|
||||||
|
make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" $MAKEFLAGS
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd $srcdir/$pkgname-build
|
||||||
|
make DESTDIR="$pkgdir" PREFIX=/usr install
|
||||||
|
}
|
||||||
24
src/config.h
Normal file
24
src/config.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
# uStreamer - Lightweight and fast MJPG-HTTP streamer. #
|
||||||
|
# #
|
||||||
|
# Copyright (C) 2018 Maxim Devaev <mdevaev@gmail.com> #
|
||||||
|
# #
|
||||||
|
# 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 <https://www.gnu.org/licenses/>. #
|
||||||
|
# #
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define VERSION "0.1"
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
@@ -69,7 +70,7 @@ static const struct option _long_opts[] = {
|
|||||||
static void _help(struct device_t *dev, struct http_server_t *server) {
|
static void _help(struct device_t *dev, struct http_server_t *server) {
|
||||||
printf("\nuStreamer - Lightweight and fast MJPG-HTTP streamer\n");
|
printf("\nuStreamer - Lightweight and fast MJPG-HTTP streamer\n");
|
||||||
printf("===================================================\n\n");
|
printf("===================================================\n\n");
|
||||||
printf("License: GPLv3\n");
|
printf("Version: %s; license: GPLv3\n", VERSION);
|
||||||
printf("Copyright (C) 2018 Maxim Devaev <mdevaev@gmail.com>\n\n");
|
printf("Copyright (C) 2018 Maxim Devaev <mdevaev@gmail.com>\n\n");
|
||||||
printf("Capturing options:\n");
|
printf("Capturing options:\n");
|
||||||
printf("------------------\n");
|
printf("------------------\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user