add .spec
This commit is contained in:
@ -6,7 +6,7 @@ LDFLAGS= $(LIBRARY_DIRS) -lrabbitmq -lmysqlclient
|
|||||||
SRCS= inih/ini.c consumer.c
|
SRCS= inih/ini.c consumer.c
|
||||||
OBJ=$(SRCS:.c=.o)
|
OBJ=$(SRCS:.c=.o)
|
||||||
all:$(OBJ)
|
all:$(OBJ)
|
||||||
$(CC) $(LDFLAGS) $(OBJ) -o consumer
|
$(CC) $(LDFLAGS) $(OBJ) -o consumer `mysql_config --cflags --libs`
|
||||||
%.o:%.c
|
%.o:%.c
|
||||||
$(CC) $(CFLAGS) $< -o $@
|
$(CC) $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
|
53
rabbitmq_consumer/rabbitmq-message-consumer.spec
Normal file
53
rabbitmq_consumer/rabbitmq-message-consumer.spec
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
%define _topdir %(echo $PWD)/
|
||||||
|
%define name rabbitmq-message-consumer
|
||||||
|
%define release beta
|
||||||
|
%define version 1.0
|
||||||
|
%define install_path /usr/local/skysql/maxscale/
|
||||||
|
|
||||||
|
BuildRoot: %{buildroot}
|
||||||
|
Summary: rabbitmq-message-consumer
|
||||||
|
License: GPL
|
||||||
|
Name: %{name}
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}
|
||||||
|
Source: %{name}-%{version}-%{release}.tar.gz
|
||||||
|
Prefix: /
|
||||||
|
Group: Development/Tools
|
||||||
|
#Requires:
|
||||||
|
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
BuildRequires: gcc gcc-c++ ncurses-devel bison glibc-devel cmake libgcc_s1 perl make libtool libopenssl-devel libaio libaio-devel mariadb libedit-devel librabbitmq-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: gcc gcc-c++ ncurses-devel bison glibc-devel cmake libgcc perl make libtool openssl-devel libaio libaio-devel librabbitmq-devel
|
||||||
|
%if 0%{?rhel} == 6
|
||||||
|
BuildRequires: libedit-devel
|
||||||
|
%endif
|
||||||
|
%if 0%{?rhel} == 7
|
||||||
|
BuildRequires: mariadb-devel mariadb-embedded-devel libedit-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: MariaDB-devel MariaDB-server
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description
|
||||||
|
rabbitmq-message-consumer
|
||||||
|
|
||||||
|
%prep
|
||||||
|
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
make clean
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{install_path}
|
||||||
|
cp consumer $RPM_BUILD_ROOT%{install_path}
|
||||||
|
|
||||||
|
%clean
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{install_path}/consumer
|
||||||
|
|
||||||
|
%changelog
|
Reference in New Issue
Block a user