Skip to content

Commit 5ce83cd

Browse files
authored
Create package-mageia-9.yml
1 parent 02000cd commit 5ce83cd

File tree

5 files changed

+190
-1
lines changed

5 files changed

+190
-1
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Mageia 9 amd64 RPM package
2+
3+
on: [workflow_dispatch]
4+
5+
jobs:
6+
build-rpm:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Build Docker image
16+
uses: docker/build-push-action@v6
17+
with:
18+
tags: image-mageia-9
19+
context: ./packages/mageia-9
20+
env:
21+
DOCKER_BUILD_RECORD_UPLOAD: false
22+
23+
- name: Build RPM package
24+
uses: addnab/docker-run-action@v3
25+
with:
26+
image: image-mageia-9
27+
options: --name container-mageia-9
28+
run: |
29+
./build.sh
30+
31+
- name: Copy from container to host
32+
uses: tj-actions/docker-cp@v2
33+
with:
34+
container: container-mageia-9
35+
source: /buildroot
36+
destination: packages/mageia-9/output
37+
38+
- name: Upload
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: Mageia 9 packages
42+
path: packages/mageia-9/output
43+
if-no-files-found: error

.hgignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ syntax: glob
66
*.log
77
*.o
88
*.pc
9-
*.spec
109
*.tar.gz
1110
*~
1211
.deps

packages/mageia-9/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM mageia:9
2+
3+
# install build dependencies
4+
RUN urpmi --auto-update --auto
5+
RUN urpmi --auto --quiet rpmdevtools bm task-c++-devel doxygen lib64evdev-devel
6+
7+
WORKDIR /buildroot
8+
COPY . .
9+
10+
CMD ["/bin/bash"]
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
%define libname %mklibname evdevxx
2+
%define devname %mklibname evdevxx -d
3+
%define staticname %mklibname evdevxx -d -s
4+
%define toolsname evdevxx-tools
5+
6+
Name: libevdevxx
7+
Version: 0.5.2
8+
Release: %mkrel 1
9+
Summary: A C++ wrapper for libevdev.
10+
Group: System/Libraries
11+
License: MIT
12+
URL: https://github.com/dkosmari/libevdevxx
13+
Source0: https://github.com/dkosmari/libevdevxx/releases/download/v%{version}/%{name}-%{version}.tar.gz
14+
15+
%description
16+
This is the library needed to run programs linked with %{name}.
17+
18+
BuildRequires: automake
19+
BuildRequires: libtool
20+
BuildRequires: pkgconfig(libevdev)
21+
BuildRequires: gcc-c++
22+
BuildRequires: doxygen
23+
24+
25+
#############
26+
## library ##
27+
#############
28+
29+
%package -n %{libname}
30+
Summary: A C++ wrapper for libevdev.
31+
Group: System/Libraries
32+
33+
%description -n %{libname}
34+
This is the library needed to run programs linked with %{libname}.
35+
36+
37+
###########
38+
## devel ##
39+
###########
40+
41+
%package -n %{devname}
42+
Summary: Development package for %{libname}.
43+
Group: Development/C++
44+
Provides: %{devname} = %{version}
45+
Requires: %{libname} = %{version}-%{release}
46+
47+
%description -n %{devname}
48+
This package provides libraries and headers files for %{name}
49+
development.
50+
51+
52+
##################
53+
## static-devel ##
54+
##################
55+
56+
%package -n %{staticname}
57+
Summary: Development package for %{libname}, with static linking.
58+
Group: Development/C++
59+
Provides: %{staticname} = %{version}
60+
61+
%description -n %{staticname}
62+
This package provides static libraries for %{name} development.
63+
64+
65+
###########
66+
## tools ##
67+
###########
68+
69+
%package -n %{toolsname}
70+
Summary: Tools from the %{name} package.
71+
Requires: %{libname} = %{version}-%{release}
72+
73+
%description -n %{toolsname}
74+
This package contains tools from %{name}:
75+
- evdevxx-query
76+
- evdevxx-read
77+
78+
79+
###########
80+
## build ##
81+
###########
82+
83+
%prep
84+
%autosetup
85+
86+
%build
87+
%configure --disable-examples --enable-docs --enable-tools
88+
%make_build
89+
90+
%install
91+
%make_install
92+
93+
94+
#####################
95+
## package library ##
96+
#####################
97+
98+
%files -n %{libname}
99+
%license COPYING
100+
%doc AUTHORS
101+
%{_libdir}/*.so.*
102+
103+
104+
###################
105+
## package devel ##
106+
###################
107+
108+
%files -n %{devname}
109+
%doc README.md
110+
%{_pkgdocdir}/html
111+
%{_includedir}/libevdevxx/*
112+
%{_libdir}/*.so
113+
%{_libdir}/pkgconfig/libevdevxx.pc
114+
115+
116+
##########################
117+
## package static-devel ##
118+
##########################
119+
120+
%files -n %{staticname}
121+
%doc README.md
122+
%{_pkgdocdir}/html
123+
%{_includedir}/libevdevxx/*
124+
%{_libdir}/*.a
125+
%{_libdir}/pkgconfig/libevdevxx.pc
126+
127+
128+
###################
129+
## package tools ##
130+
###################
131+
132+
%files -n evdevxx-tools
133+
%{_bindir}/evdevxx-*

packages/mageia-9/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash -x
2+
rpmdev-spectool --directory SOURCES --get-files SPECS/libevdevxx.spec || exit 1
3+
bm -l SPECS/libevdevxx.spec || exit 2
4+
exit 0

0 commit comments

Comments
 (0)