-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong version into meson build file #475
Comments
do you use the meson build file? Do you maybe have an example project how it's used? Maybe we can also use it in the CI pipeline. |
Actually I use it order to get all dependencies of DCD, thus I have created the spec below to make rpms file: # debug info seem not works with D compiler
#%%global debug_package %%{nil}
%global major_version 0
%global minor_version 20
%global patch_version 0
#%%global pre beta
%global base_name libdparse
Name: dlang-libdparse
Version: %{major_version}.%{minor_version}.%{patch_version}
Release: %autorelease
Summary: Library for lexing and parsing D source code
Summary(fr): Bibliothèque pour l'analyse syntaxique et grammaticale de code source D
License: Boost
URL: https://github.com/dlang-community/libdparse
Source0: https://github.com/dlang-community/libdparse/archive/v%{version}%{?pre:-%{pre}}/%{name}-%{version}%{?pre:-%{pre}}.tar.gz
# ISSUE: https://github.com/dlang-community/libdparse/pull/257
#Patch0: https://patch-diff.githubusercontent.com/raw/dlang-community/libdparse/pull/257.patch#/0001-Add-Meson-build-definition.patch
ExclusiveArch: %{ldc_arches}
BuildRequires: ldc meson dlang-libstdx-allocator-devel
Requires: ldc-libs dlang-libstdx-allocator
%description
Library for lexing and parsing D source code.
%description -l fr
Bibliothèque pour l'analyse syntaxique et grammaticale de code source en D.
%package devel
Summary: Development files for %{name}
Summary(fr): Fichiers de développement pour %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: dlang-libstdx-allocator-devel
%description devel
libdparse package contains header files for developing D applications
that use libdparse.
%description devel -l fr
Le paquet libdparse contient les fichiers d'entêtes pour développer
des applications en D utilisant libdparse.
%package geany-tags
Summary: Support for enable autocompletion in geany
Summary(fr): Support pour activer l'auto-complétion dans geany
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
BuildRequires: geany
Requires: geany
%description geany-tags
Enable autocompletion for dsymbol library in geany (IDE)
%description -l fr geany-tags
Active l'autocompletion pour pour la bibliothèque dsymbol dans geany (IDE)
%prep
%autosetup -n %{base_name}-%{version}%{?pre:-%{pre}}
# temp geany config directory for allow geany to generate tags
mkdir geany_config
sed -i "4 s/version: '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*'/version: '%{version}'/" meson.build
%build
export DFLAGS="%{_d_optflags}"
LDFLAGS='-Wl,-z,relro -Wl,-z,now' %meson
%meson_build
# generate doc
src_dir='src'
sources=$(find "${src_dir}" -name '*.d')
for f in ${sources[@]}; do
d_path=$(dirname ${f});
d_file=$(basename ${f});
doc_file=doc-src/${d_path/${src_dir}}/${d_file/.d/.html};
ldc2 -I %{_includedir}/d/stdx-allocator -I "${src_dir}" -o- -c $f -Df "${doc_file}" doc-src/index.ddoc doc-src/macros.ddoc;
done
mv doc-src html
# generate geany tags
headers=$(find src -name '*.d')
geany -c geany_config -g %{base_name}.d.tags ${headers[@]}
%install
%meson_install
# geany tags
mkdir -p %{buildroot}%{_datadir}/geany/tags/
install -pm0644 %{base_name}.d.tags %{buildroot}/%{_datadir}/geany/tags/
%ldconfig_scriptlets
%files
%license LICENSE_1_0.txt
%doc README.md
%{_libdir}/%{base_name}.so.%{version}
%{_libdir}/%{base_name}.so.%{major_version}
%files devel
%doc html
%{_libdir}/pkgconfig/dparse.pc
%{_includedir}/d/dparse
%{_libdir}/%{base_name}.so
%files geany-tags
%{_datadir}/geany/tags/%{base_name}.d.tags
%changelog
%autochangelog Note:
some of those flags are useless for D, they are always provided at rpm build time |
Dear the meson build file have to be updated to match the same tag.
Currently it is 0.20.0 while the file contains 0.10.4
maybe you would have to add a unit test to check automatically
The text was updated successfully, but these errors were encountered: